mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-09 04:56:44 +08:00
cppfiles.c (open_file): Change mode (DJGPP only) of redirected input to O_BINARY.
* cppfiles.c (open_file): Change mode (DJGPP only) of redirected input to O_BINARY. From-SVN: r53431
This commit is contained in:
parent
859f7aaf41
commit
85be8c2de8
@ -1,3 +1,8 @@
|
||||
2002-05-13 Andris Pavenis <pavenis@lanet.lv>
|
||||
|
||||
* cppfiles.c (open_file): Change mode (DJGPP only) of redirected
|
||||
input to O_BINARY.
|
||||
|
||||
2002-05-13 Jeffrey A Law (law@redhat.com)
|
||||
|
||||
* i386.c (ia32_multipass_dfa_lookahead): Prototype.
|
||||
|
@ -270,7 +270,15 @@ open_file (pfile, filename)
|
||||
Special case: the empty string is translated to stdin. */
|
||||
|
||||
if (filename[0] == '\0')
|
||||
file->fd = 0;
|
||||
{
|
||||
file->fd = 0;
|
||||
#ifdef __DJGPP__
|
||||
/* For DJGPP redirected input is opened in text mode. Change it
|
||||
to binary mode. */
|
||||
if (! isatty (file->fd))
|
||||
setmode (file->fd, O_BINARY);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
file->fd = open (file->name, O_RDONLY | O_NOCTTY | O_BINARY, 0666);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user