changeset 9772:20652342eb9a

(main) [WINDOWSNT]: Now sets _fmode and stdout to O_BINARY. [WINDOWSNT]: Include the NT headers. (READ_TEXT, READ_BINARY): Test DOS_NT, not MS_DOS.
author Richard M. Stallman <rms@gnu.org>
date Tue, 01 Nov 1994 05:23:42 +0000
parents 3a51735d4a55
children bd49556a7552
files lib-src/make-docfile.c
diffstat 1 files changed, 15 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/make-docfile.c	Tue Nov 01 04:22:00 1994 +0000
+++ b/lib-src/make-docfile.c	Tue Nov 01 05:23:42 1994 +0000
@@ -35,14 +35,19 @@
 #ifdef MSDOS
 #include <fcntl.h>
 #endif /* MSDOS */
+#ifdef WINDOWSNT
+#include <stdlib.h>
+#include <fcntl.h>
+#include <direct.h>
+#endif /* WINDOWSNT */
 
-#ifdef MSDOS
+#ifdef DOS_NT
 #define READ_TEXT "rt"
 #define READ_BINARY "rb"
-#else /* not MSDOS */
+#else  /* not DOS_NT */
 #define READ_TEXT "r"
 #define READ_BINARY "r"
-#endif /* not MSDOS */
+#endif /* not DOS_NT */
 
 int scan_file ();
 int scan_lisp_file ();
@@ -59,11 +64,17 @@
   int err_count = 0;
   int first_infile;
 
+  /* Don't put CRs in the DOC file.  */
 #ifdef MSDOS
-  _fmode = O_BINARY;	/* all of files are treated as binary files */
+  _fmode = O_BINARY;
   (stdout)->_flag &= ~_IOTEXT;
   _setmode (fileno (stdout), O_BINARY);
 #endif /* MSDOS */
+#ifdef WINDOWSNT
+  _fmode = O_BINARY;
+  _setmode (fileno (stdout), O_BINARY);
+#endif /* WINDOWSNT */
+
   outfile = stdout;
 
   /* If first two args are -o FILE, output to FILE.  */