comparison src/emacs.c @ 14968:1351c75bc3d6

(main) [MSDOS]: Handle DJGPP version 2.
author Richard M. Stallman <rms@gnu.org>
date Wed, 10 Apr 1996 01:00:12 +0000
parents 1968e2da175c
children a29d378dc9cd
comparison
equal deleted inserted replaced
14967:5c431b2e0f95 14968:1351c75bc3d6
530 530
531 #ifdef MSDOS 531 #ifdef MSDOS
532 /* We do all file input/output as binary files. When we need to translate 532 /* We do all file input/output as binary files. When we need to translate
533 newlines, we do that manually. */ 533 newlines, we do that manually. */
534 _fmode = O_BINARY; 534 _fmode = O_BINARY;
535
536 #if __DJGPP__ >= 2
537 if (!isatty (fileno (stdin)))
538 setmode (fileno (stdin), O_BINARY);
539 if (!isatty (fileno (stdout)))
540 {
541 fflush (stdout);
542 setmode (fileno (stdout), O_BINARY);
543 }
544 #else /* not __DJGPP__ >= 2 */
535 (stdin)->_flag &= ~_IOTEXT; 545 (stdin)->_flag &= ~_IOTEXT;
536 (stdout)->_flag &= ~_IOTEXT; 546 (stdout)->_flag &= ~_IOTEXT;
537 (stderr)->_flag &= ~_IOTEXT; 547 (stderr)->_flag &= ~_IOTEXT;
548 #endif /* not __DJGPP__ >= 2 */
538 #endif /* MSDOS */ 549 #endif /* MSDOS */
539 550
540 #ifdef SET_EMACS_PRIORITY 551 #ifdef SET_EMACS_PRIORITY
541 if (emacs_priority) 552 if (emacs_priority)
542 nice (emacs_priority); 553 nice (emacs_priority);
774 785
775 #ifdef MSDOS 786 #ifdef MSDOS
776 /* Call early 'cause init_environment needs it. */ 787 /* Call early 'cause init_environment needs it. */
777 init_dosfns (); 788 init_dosfns ();
778 /* Set defaults for several environment variables. */ 789 /* Set defaults for several environment variables. */
779 if (initialized) init_environment (argc, argv, skip_args); 790 if (initialized)
780 else init_gettimeofday (); 791 init_environment (argc, argv, skip_args);
781 #endif 792 else
793 {
794 #if __DGJPP__ >= 2
795 tzset ();
796 #else
797 init_gettimeofday ();
798 #endif
799 }
800 #endif /* MSDOS */
782 801
783 #ifdef WINDOWSNT 802 #ifdef WINDOWSNT
784 /* Initialize environment from registry settings. */ 803 /* Initialize environment from registry settings. */
785 init_environment (); 804 init_environment ();
786 #endif 805 #endif