From: Wez Furlong Date: Sat, 16 Nov 2002 22:52:22 +0000 (+0000) Subject: Change "wb" -> "r+b" for win32. X-Git-Tag: php-4.3.0RC2~123 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4ef373153a83d6749f9a688a00d02947a90b7478;p=php Change "wb" -> "r+b" for win32. The difference is staggering - I've spent hours tracking this down. It should probably be made the same for all platforms. --- diff --git a/main/php_open_temporary_file.c b/main/php_open_temporary_file.c index 9911a69233..e6a83a9c38 100644 --- a/main/php_open_temporary_file.c +++ b/main/php_open_temporary_file.c @@ -130,7 +130,7 @@ static FILE *php_do_open_temporary_file(const char *path, const char *pfx, char #ifdef PHP_WIN32 if (GetTempFileName(path, pfx, 0, opened_path)) { - fp = VCWD_FOPEN(opened_path, "wb"); + fp = VCWD_FOPEN(opened_path, "r+b"); } else { fp = NULL; }