cvs: php4(PHP_4_3) /main streams.c
| From: | Wez Furlong | Date: | Wed, 21 May 2003 12:02:55 +0000 |
| Subject: | cvs: php4(PHP_4_3) /main streams.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-21172@lists.php.net to get a copy of this message | ||
wez Wed May 21 08:02:55 2003 EDT
Modified files: (Branch: PHP_4_3)
/php4/main streams.c
Log:
Allow win32 people to fopen($filename, 'rt') to explicitly chose text-mode
files again.
The functionality was accidentally dropped when we introduced our own fopen
mode string parser.
Index: php4/main/streams.c
diff -u php4/main/streams.c:1.125.2.63 php4/main/streams.c:1.125.2.64
--- php4/main/streams.c:1.125.2.63 Wed May 21 06:19:03 2003
+++ php4/main/streams.c Wed May 21 08:02:55 2003
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: streams.c,v 1.125.2.63 2003/05/21 10:19:03 zeev Exp $ */
+/* $Id: streams.c,v 1.125.2.64 2003/05/21 12:02:55 wez Exp $ */
#define _GNU_SOURCE
#include "php.h"
@@ -1914,6 +1914,11 @@
#ifdef O_BINARY
if (strchr(mode, 'b')) {
flags |= O_BINARY;
+ }
+#endif
+#ifdef _O_TEXT
+ if (strchr(mode, 't')) {
+ flags |= _O_TEXT;
}
#endif