Re: cvs: php4(PHP_4_3) /main php_open_temporary_file.c

From: Date: Sat, 16 Nov 2002 23:11:55 +0000
Subject: Re: cvs: php4(PHP_4_3) /main php_open_temporary_file.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-16334@lists.php.net to get a copy of this message
Hmm, I don't know how many places in PHP have the flags, but maybe it might be a good idea to have defines in place to make sure that the apropriate flags are used for different platforms. SHane Wez Furlong wrote:
wez Sat Nov 16 17:52:22 2002 EDT
  Modified files:              (Branch: PHP_4_3)
    /php4/main	php_open_temporary_file.c
Log: 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. Index: php4/main/php_open_temporary_file.c diff -u php4/main/php_open_temporary_file.c:1.18 php4/main/php_open_temporary_file.c:1.18.2.1 --- php4/main/php_open_temporary_file.c:1.18 Mon Sep 9 08:01:21 2002 +++ php4/main/php_open_temporary_file.c Sat Nov 16 17:52:22 2002 @@ -130,7 +130,7 @@ #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; }


« previous php.cvs (#16334) next »