| delorie.com/archives/browse.cgi | search |
> Date: Wed, 8 May 2002 09:23:38 -0700
> From: Zack Weinberg <zack AT codesourcery DOT com>
>
> if (filename[0] == '\0')
> {
> file->fd = 0;
> #ifdef __DJGPP__
> setmode(file->fd, O_BINARY)
> #endif
> }
> else
> ...
I suggest to use this instead:
if (filename[0] == '\0')
{
file->fd = 0;
#ifdef __DJGPP__
if (!isatty(file->fd))
setmode(file->fd, O_BINARY)
#endif
}
else
...
(See my other mail for the reasons.)
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |