1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 19:23:22 +02:00

MFB: binary mode by default under win32.

This commit is contained in:
Wez Furlong
2003-07-05 08:25:25 +00:00
parent a952e28c73
commit fa342d2404
+5 -7
View File
@@ -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')) {
#if defined(_O_TEXT) && defined(O_BINARY)
if (strchr(mode, 't')) {
flags |= _O_TEXT;
} else {
flags |= O_BINARY;
}
#endif
#ifdef _O_TEXT
if (strchr(mode, 't')) {
flags |= _O_TEXT;
}
#endif
*open_flags = flags;
return SUCCESS;
}