#ifdef MSDOS
#if __DJGPP__ >= 2
- setmode (fileno (stdout), O_BINARY);
+ if (!isatty (fileno (stdout)))
+ setmode (fileno (stdout), O_BINARY);
#else
(stdout)->_flag &= ~_IOTEXT; /* print binary */
_setmode (fileno (stdout), O_BINARY);
{
#ifdef MSDOS
#if __DJGPP__ >= 2
- setmode (fileno (stdout), O_BINARY);
+ if (!isatty (fileno (fp)))
+ setmode (fileno (fp), O_BINARY);
#else
(fp)->_flag &= ~_IOTEXT; /* read binary */
_setmode (fileno (fp), O_BINARY);