summaryrefslogtreecommitdiff
path: root/lib-src/make-docfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib-src/make-docfile.c')
-rw-r--r--lib-src/make-docfile.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c
index 6692a0a6450..cb0a56607f8 100644
--- a/lib-src/make-docfile.c
+++ b/lib-src/make-docfile.c
@@ -38,17 +38,16 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <stdio.h>
#include <stdlib.h> /* config.h unconditionally includes this anyway */
-#ifdef MSDOS
-#include <fcntl.h>
-#endif /* MSDOS */
+
#ifdef WINDOWSNT
/* Defined to be sys_fopen in ms-w32.h, but only #ifdef emacs, so this
is really just insurance. */
#undef fopen
-#include <fcntl.h>
#include <direct.h>
#endif /* WINDOWSNT */
+#include <binary-io.h>
+
#ifdef DOS_NT
/* Defined to be sys_chdir in ms-w32.h, but only #ifdef emacs, so this
is really just insurance.
@@ -167,19 +166,7 @@ main (int argc, char **argv)
++i;
}
- /* Don't put CRs in the output file. */
-#ifdef MSDOS
- _fmode = O_BINARY;
-#if 0 /* Suspicion is that this causes hanging.
- So instead we require people to use -o on MSDOS. */
- (stdout)->_flag &= ~_IOTEXT;
- _setmode (fileno (stdout), O_BINARY);
-#endif
-#endif /* MSDOS */
-#ifdef WINDOWSNT
- _fmode = O_BINARY;
- _setmode (fileno (stdout), O_BINARY);
-#endif /* WINDOWSNT */
+ set_binary_mode (fileno (stdout), O_BINARY);
if (generate_globals)
start_globals ();