* emacs.c (main) [WINDOWSNT]: Move it here.
+2004-02-18 Jason Rumney <jasonr@gnu.org>
+
+ * unexw32.c (_start): Remove _fmode initialization.
+
+ * emacs.c (main) [WINDOWSNT]: Move it here.
+
2004-01-23 Kenichi Handa <handa@m17n.org>
* fns.c (Fmd5): If OBJECT is a buffer different from the current
#include <sys/ioctl.h>
#endif
+#ifdef WINDOWSNT
+#include <fcntl.h>
+#endif
+
#include "lisp.h"
#include "commands.h"
#include "intervals.h"
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);
#include <config.h>
-#include <stdlib.h> /* _fmode */
#include <stdio.h>
#include <fcntl.h>
#include <time.h>
/* 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);