(main) [MSDOS]: Handle DJGPP version 2.

This commit is contained in:
Richard M. Stallman 1996-04-10 01:00:12 +00:00
parent 515dd7113c
commit 18198bb209
2 changed files with 28 additions and 2 deletions

View file

@ -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];