From 7e8e53da8ccc5cd5bb47b6df823f4e2b7f976d93 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 10 Apr 1996 01:00:12 +0000 Subject: (main) [MSDOS]: Handle DJGPP version 2. --- lib-src/b2m.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib-src') diff --git a/lib-src/b2m.c b/lib-src/b2m.c index 9da7a91b60f..88d0acd5cd8 100644 --- a/lib-src/b2m.c +++ b/lib-src/b2m.c @@ -89,8 +89,15 @@ main (argc, argv) #ifdef MSDOS _fmode = O_BINARY; /* all of files are treated as binary files */ +#if __DJGPP__ > 1 + if (!isatty (fileno (stdout))) + setmode (fileno (stdout), O_BINARY); + if (!isatty (fileno (stdin))) + setmode (fileno (stdin), O_BINARY); +#else /* not __DJGPP__ > 1 */ (stdout)->_flag &= ~_IOTEXT; (stdin)->_flag &= ~_IOTEXT; +#endif /* not __DJGPP__ > 1 */ #endif progname = argv[0]; -- cgit v1.2.1