wez Wed May 28 06:15:00 2003 EDT Modified files: (Branch: PHP_4_3) /php4/main streams.c Log: On win32, always open in binary mode unless they asked for text mode using 't'. This solves a number of apparent BC breaks that resulted from the move from fopen() to open(). Index: php4/main/streams.c diff -u php4/main/streams.c:1.125.2.66 php4/main/streams.c:1.125.2.67 --- php4/main/streams.c:1.125.2.66 Fri May 23 11:27:09 2003 +++ php4/main/streams.c Wed May 28 06:15:00 2003 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: streams.c,v 1.125.2.66 2003/05/23 15:27:09 wez Exp $ */ +/* $Id: streams.c,v 1.125.2.67 2003/05/28 10:15:00 wez Exp $ */ #define _GNU_SOURCE #include "php.h" @@ -1912,14 +1912,11 @@ 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
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php