Skip to content

Commit

Permalink
Ensure only DOSish builds force O_BINARY=1 in the open path
Browse files Browse the repository at this point in the history
  • Loading branch information
paulg1973 authored and Karl Williamson committed Mar 19, 2013
1 parent c0fcb8c commit 93f31ee
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions perlio.c
Expand Up @@ -2610,10 +2610,15 @@ PerlIOUnix_oflags(const char *mode)
oflags &= ~O_BINARY;
mode++;
}
/*
* Always open in binary mode
*/
oflags |= O_BINARY;
else {
#ifdef PERLIO_USING_CRLF
/*
* If neither "t" nor "b" was specified, open the file
* in O_BINARY mode.
*/
oflags |= O_BINARY;
#endif
}
if (*mode || oflags == -1) {
SETERRNO(EINVAL, LIB_INVARG);
oflags = -1;
Expand Down

0 comments on commit 93f31ee

Please sign in to comment.