diff options
author | Wez Furlong <wez@php.net> | 2003-07-05 08:25:25 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2003-07-05 08:25:25 +0000 |
commit | fa342d2404a9c809d0a182d80798da2abd3a98f7 (patch) | |
tree | 0cfb02479132ec2ecddd73142ca14f8e30f7692c /main/streams/plain_wrapper.c | |
parent | a952e28c739f90bec35d68f70c01fc06ed30e4e2 (diff) | |
download | php-git-fa342d2404a9c809d0a182d80798da2abd3a98f7.tar.gz |
MFB: binary mode by default under win32.
Diffstat (limited to 'main/streams/plain_wrapper.c')
-rw-r--r-- | main/streams/plain_wrapper.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index 06909895e5..cc814f01ad 100644 --- a/main/streams/plain_wrapper.c +++ b/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; } |