changeset 2502:261c5cd19207

[xemacs-hg @ 2005-01-26 03:40:10 by ben] Puh-raise the lawd! insert-data-in-exec.c: Need to open everything as binary. Makefile.in.in: 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
author ben
date Wed, 26 Jan 2005 03:40:15 +0000
parents b02114faf3c2
children 9db2c524b815
files lib-src/ChangeLog lib-src/insert-data-in-exec.c src/ChangeLog src/Makefile.in.in
diffstat 4 files changed, 25 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/ChangeLog	Tue Jan 25 22:52:00 2005 +0000
+++ b/lib-src/ChangeLog	Wed Jan 26 03:40:15 2005 +0000
@@ -1,3 +1,8 @@
+2005-01-25  Ben Wing  <ben@xemacs.org>
+
+	* insert-data-in-exec.c (main):
+	Need to open everything as binary.
+
 2004-12-06  Ben Wing  <ben@xemacs.org>
 
 	* i.c (pump):
--- a/lib-src/insert-data-in-exec.c	Tue Jan 25 22:52:00 2005 +0000
+++ b/lib-src/insert-data-in-exec.c	Wed Jan 26 03:40:15 2005 +0000
@@ -121,7 +121,7 @@
   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);
--- a/src/ChangeLog	Tue Jan 25 22:52:00 2005 +0000
+++ b/src/ChangeLog	Wed Jan 26 03:40:15 2005 +0000
@@ -1,6 +1,17 @@
-2005-01-24  Ben Wing  <ben@xemacs.org>
-
-	* s/windowsnt.h:
+2005-01-25  Ben Wing  <ben@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
 
 2005-01-24  Ben Wing  <ben@xemacs.org>
 
--- a/src/Makefile.in.in	Tue Jan 25 22:52:00 2005 +0000
+++ b/src/Makefile.in.in	Wed Jan 26 03:40:15 2005 +0000
@@ -377,15 +377,16 @@
 
 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
 %.o : %.c
 #else