wez Mon Nov 18 07:41:04 2002 EDT
Modified files: (Branch: PHP_4_3)
/php4/main php_open_temporary_file.c memory_streams.c
Log:
wb -> r+b
Index: php4/main/php_open_temporary_file.c
diff -u php4/main/php_open_temporary_file.c:1.18.2.2
php4/main/php_open_temporary_file.c:1.18.2.3
--- php4/main/php_open_temporary_file.c:1.18.2.2 Mon Nov 18 06:50:36 2002
+++ php4/main/php_open_temporary_file.c Mon Nov 18 07:41:04 2002
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_open_temporary_file.c,v 1.18.2.2 2002/11/18 11:50:36 wez Exp $ */
+/* $Id: php_open_temporary_file.c,v 1.18.2.3 2002/11/18 12:41:04 wez Exp $ */
#include "php.h"
@@ -149,7 +149,7 @@
if (fd==-1) {
fp = NULL;
} else {
- fp = fdopen(fd, "wb");
+ fp = fdopen(fd, "r+b");
}
#else
if (mktemp(opened_path)) {
Index: php4/main/memory_streams.c
diff -u php4/main/memory_streams.c:1.20 php4/main/memory_streams.c:1.20.2.1
--- php4/main/memory_streams.c:1.20 Sun Oct 20 19:05:34 2002
+++ php4/main/memory_streams.c Mon Nov 18 07:41:04 2002
@@ -221,7 +221,7 @@
self->smax = -1;
self->mode = mode;
- stream = php_stream_alloc(&php_stream_memory_ops, self, 0, "rwb");
+ stream = php_stream_alloc(&php_stream_memory_ops, self, 0, "r+b");
stream->flags |= PHP_STREAM_FLAG_NO_BUFFER;
return stream;
}
@@ -434,7 +434,7 @@
assert(self != NULL);
self->smax = max_memory_usage;
self->mode = mode;
- stream = php_stream_alloc(&php_stream_temp_ops, self, 0, "rwb");
+ stream = php_stream_alloc(&php_stream_temp_ops, self, 0, "r+b");
stream->flags |= PHP_STREAM_FLAG_NO_BUFFER;
self->innerstream = php_stream_memory_create(mode);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php