Skip to content
Permalink
Browse files

MFB: binary mode by default under win32.

  • Loading branch information...
wez committed Jul 5, 2003
1 parent a952e28 commit fa342d2404a9c809d0a182d80798da2abd3a98f7
Showing with 4 additions and 6 deletions.
  1. +4 −6 main/streams/plain_wrapper.c
@@ -69,16 +69,14 @@ PHPAPI int php_stream_parse_fopen_modes(const char *mode, int *open_flags)
flags |= O_RDONLY;
}

#ifdef O_BINARY
if (strchr(mode, 'b')) {
flags |= O_BINARY;
}
#endif
#ifdef _O_TEXT
#if defined(_O_TEXT) && defined(O_BINARY)
if (strchr(mode, 't')) {
flags |= _O_TEXT;
} else {
flags |= O_BINARY;
}
#endif

*open_flags = flags;
return SUCCESS;
}

0 comments on commit fa342d2

Please sign in to comment.
You can’t perform that action at this time.