NOTE: This patch has been committed.
At last I have fixed the problems under Cygwin. This also fixes another
fairly serious problem accessing the TTY (making -nw not work, e.g.).
Highly recommended for 21.4, except for the change to
insert-data-in-exec.c, which doesn't exist there.
Sergey, you added this file cygwin.sc a couple of years ago; but it appears
to seriously mess things up, at the very least under PDUMP, where it's
clearly not needed. Is this still needed for the old dumper?
lib-src/ChangeLog addition:
2005-01-25 Ben Wing <ben(a)xemacs.org>
* insert-data-in-exec.c (main):
Need to open everything as binary.
src/ChangeLog addition:
2005-01-25 Ben Wing <ben(a)xemacs.org>
* Makefile.in.in:
* Makefile.in.in (%.o):
Don't compile executable as Windows (-mwindows) under Cygwin.
Semi-recent changes to Cygwin's executable-startup handling make
it impossible to access the TTY this way.
Don't use special linker file under Cygwin (cygwin.sc) except
when non-PDUMP (even in this case it is highly questionable); you
get errors like
1 [main] temacs 1364 fhandler_console::fixup_after_exec: error opening input console
handle after exec, errno 13, Win32 error 5
5820 [main] temacs 1364 fhandler_console::fixup_after_exec: error opening output
console handle after exec, errno 13, Win32 error 5
build source patch:
Diff command: bash -ci "cvs-diff --show-c-function -no-changelog "
Files affected: src/Makefile.in.in lib-src/insert-data-in-exec.c
cvs server: Diffing .
cvs server: Diffing dynodump
cvs server: Diffing dynodump/i386
cvs server: Diffing dynodump/ppc
cvs server: Diffing dynodump/sparc
cvs server: Diffing etc
cvs server: Diffing etc/custom
cvs server: Diffing etc/custom/example-themes
cvs server: Diffing etc/eos
cvs server: Diffing etc/idd
cvs server: Diffing etc/photos
cvs server: Diffing etc/sparcworks
cvs server: Diffing etc/tests
cvs server: Diffing etc/tests/external-widget
cvs server: Diffing etc/toolbar
cvs server: Diffing etc/unicode
cvs server: Diffing etc/unicode/ibm
cvs server: Diffing etc/unicode/mule-ucs
cvs server: Diffing etc/unicode/other
cvs server: Diffing etc/unicode/unicode-consortium
cvs server: Diffing info
cvs server: Diffing lib-src
Index: lib-src/insert-data-in-exec.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lib-src/insert-data-in-exec.c,v
retrieving revision 1.2
diff -u -p -r1.2 insert-data-in-exec.c
--- lib-src/insert-data-in-exec.c 2004/04/17 13:29:20 1.2
+++ lib-src/insert-data-in-exec.c 2005/01/26 03:31:31
@@ -121,7 +121,7 @@ int main(int argc, char **argv)
fprintf(stderr, "dumped_data found at offset 0x%lx, patching.\n", i);
sprintf(msg, "Opening %s failed", argv[2]);
- dump = fopen(argv[2], "r");
+ dump = fopen(argv[2], "rb");
if(!dump) {
perror(msg);
exit(1);
cvs server: Diffing lisp
cvs server: Diffing lisp/mule
cvs server: Diffing lisp/term
cvs server: Diffing lock
cvs server: Diffing lwlib
cvs server: Diffing man
cvs server: Diffing man/internals
cvs server: Diffing man/lispref
cvs server: Diffing man/new-users-guide
cvs server: Diffing man/xemacs
cvs server: Diffing modules
cvs server: Diffing modules/base64
cvs server: Diffing modules/common
cvs server: Diffing modules/ldap
cvs server: Diffing modules/postgresql
cvs server: Diffing modules/sample
cvs server: Diffing modules/sample/external
cvs server: Diffing modules/sample/internal
cvs server: Diffing modules/zlib
cvs server: Diffing netinstall
cvs server: Diffing nt
cvs server: Diffing nt/installer
cvs server: Diffing nt/installer/Wise
cvs server: Diffing src
Index: src/Makefile.in.in
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/Makefile.in.in,v
retrieving revision 1.113
diff -u -p -r1.113 Makefile.in.in
--- src/Makefile.in.in 2004/12/07 12:52:51 1.113
+++ src/Makefile.in.in 2005/01/26 03:31:31
@@ -377,13 +377,14 @@ mo_file = $(LIB_SRC)/emacs.mo
cppflags = $(CPPFLAGS) -Demacs -I. $(c_switch_all)
cflags = $(CFLAGS) $(cppflags)
-#if defined (WIN32_NATIVE) || defined (CYGWIN)
+#if defined (WIN32_NATIVE)
ldflags = $(LDFLAGS) -mwindows -e _mainCRTStartup $(ld_switch_all)
$(ld_dynamic_link_flags)
-# if defined (CYGWIN)
-ldflags += -Wl,--script=s/cygwin.sc
-# endif
#else
ldflags = $(LDFLAGS) $(ld_switch_all) $(ld_dynamic_link_flags)
+#endif
+
+#if defined (CYGWIN) && !defined (PDUMP)
+ldflags += -Wl,--script=s/cygwin.sc
#endif
#ifdef SOLARIS2
cvs server: Diffing src/m
cvs server: Diffing src/s
cvs server: Diffing tests
cvs server: Diffing tests/DLL
cvs server: Diffing tests/Dnd
cvs server: Diffing tests/automated
cvs server: Diffing tests/gtk
cvs server: Diffing tests/mule
cvs server: Diffing tests/tooltalk
Show replies by date