From d942ddb8e1b0cef95e1fea82b52f4161373e7ae3 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Wed, 18 Feb 2004 22:46:48 +0000 Subject: [PATCH] * unexw32.c (_start): Remove _fmode initialization. * emacs.c (main) [WINDOWSNT]: Move it here. --- src/ChangeLog | 6 ++++++ src/emacs.c | 8 +++++++- src/unexw32.c | 5 ----- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 068f19ea821..ad632ce0c3f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2004-02-18 Jason Rumney + + * unexw32.c (_start): Remove _fmode initialization. + + * emacs.c (main) [WINDOWSNT]: Move it here. + 2004-01-23 Kenichi Handa * fns.c (Fmd5): If OBJECT is a buffer different from the current diff --git a/src/emacs.c b/src/emacs.c index 274c151d180..01a71311984 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -40,6 +40,10 @@ Boston, MA 02111-1307, USA. */ #include #endif +#ifdef WINDOWSNT +#include +#endif + #include "lisp.h" #include "commands.h" #include "intervals.h" @@ -874,11 +878,13 @@ main (argc, argv, envp) uninterrupt_malloc (); #endif /* not SYSTEM_MALLOC */ -#ifdef MSDOS +#if defined (MSDOS) || defined (WINDOWSNT) /* We do all file input/output as binary files. When we need to translate newlines, we do that manually. */ _fmode = O_BINARY; +#endif +#ifdef MSDOS #if __DJGPP__ >= 2 if (!isatty (fileno (stdin))) setmode (fileno (stdin), O_BINARY); diff --git a/src/unexw32.c b/src/unexw32.c index 7b907beda6e..1ef7f14f73e 100644 --- a/src/unexw32.c +++ b/src/unexw32.c @@ -23,7 +23,6 @@ Boston, MA 02111-1307, USA. #include -#include /* _fmode */ #include #include #include @@ -112,10 +111,6 @@ _start (void) /* Grab our malloc arena space now, before CRT starts up. */ init_heap (); - /* The default behavior is to treat files as binary and patch up - text files appropriately, in accordance with the MSDOS code. */ - _fmode = O_BINARY; - /* This prevents ctrl-c's in shells running while we're suspended from having us exit. */ SetConsoleCtrlHandler ((PHANDLER_ROUTINE) ctrl_c_handler, TRUE); -- 2.39.5