aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorRichard M. Stallman1994-11-01 05:23:42 +0000
committerRichard M. Stallman1994-11-01 05:23:42 +0000
commit86b0513a2cc57df26af9aa756384a13704abc924 (patch)
tree8c4a1287b5eb1635c4466953a41bca8e42ea3ecb /lib-src
parent72dddf8ba825cab138a717779c1fdc2ddab5a55e (diff)
downloademacs-86b0513a2cc57df26af9aa756384a13704abc924.tar.gz
emacs-86b0513a2cc57df26af9aa756384a13704abc924.zip
(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.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/make-docfile.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c
index cb500f0e6c2..fbcebde1440 100644
--- a/lib-src/make-docfile.c
+++ b/lib-src/make-docfile.c
@@ -35,14 +35,19 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
35#ifdef MSDOS 35#ifdef MSDOS
36#include <fcntl.h> 36#include <fcntl.h>
37#endif /* MSDOS */ 37#endif /* MSDOS */
38#ifdef WINDOWSNT
39#include <stdlib.h>
40#include <fcntl.h>
41#include <direct.h>
42#endif /* WINDOWSNT */
38 43
39#ifdef MSDOS 44#ifdef DOS_NT
40#define READ_TEXT "rt" 45#define READ_TEXT "rt"
41#define READ_BINARY "rb" 46#define READ_BINARY "rb"
42#else /* not MSDOS */ 47#else /* not DOS_NT */
43#define READ_TEXT "r" 48#define READ_TEXT "r"
44#define READ_BINARY "r" 49#define READ_BINARY "r"
45#endif /* not MSDOS */ 50#endif /* not DOS_NT */
46 51
47int scan_file (); 52int scan_file ();
48int scan_lisp_file (); 53int scan_lisp_file ();
@@ -59,11 +64,17 @@ main (argc, argv)
59 int err_count = 0; 64 int err_count = 0;
60 int first_infile; 65 int first_infile;
61 66
67 /* Don't put CRs in the DOC file. */
62#ifdef MSDOS 68#ifdef MSDOS
63 _fmode = O_BINARY; /* all of files are treated as binary files */ 69 _fmode = O_BINARY;
64 (stdout)->_flag &= ~_IOTEXT; 70 (stdout)->_flag &= ~_IOTEXT;
65 _setmode (fileno (stdout), O_BINARY); 71 _setmode (fileno (stdout), O_BINARY);
66#endif /* MSDOS */ 72#endif /* MSDOS */
73#ifdef WINDOWSNT
74 _fmode = O_BINARY;
75 _setmode (fileno (stdout), O_BINARY);
76#endif /* WINDOWSNT */
77
67 outfile = stdout; 78 outfile = stdout;
68 79
69 /* If first two args are -o FILE, output to FILE. */ 80 /* If first two args are -o FILE, output to FILE. */