svn: /php/php-src/branches/PHP_5_3_2/ ext/curl/streams.c main/streams/cast.c tests/security/open_basedir_parse_ini_file.phpt
| From: | Pierre Joye | Date: | Wed, 03 Feb 2010 20:49:03 +0000 |
| Subject: | svn: /php/php-src/branches/PHP_5_3_2/ ext/curl/streams.c main/streams/cast.c tests/security/open_basedir_parse_ini_file.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-61754@lists.php.net to get a copy of this message | ||
pajoye Wed, 03 Feb 2010 20:49:03 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=294462
Log:
- Fixed bug #50791 (Compile failure: Bad logic in defining fopencookie emulation
Bug: http://bugs.php.net/50791 (Closed) Bad logic in
defining fopencookie emulation
Changed paths:
_U php/php-src/branches/PHP_5_3_2/
U php/php-src/branches/PHP_5_3_2/ext/curl/streams.c
_U php/php-src/branches/PHP_5_3_2/ext/tidy/tests/
U php/php-src/branches/PHP_5_3_2/main/streams/cast.c
_U php/php-src/branches/PHP_5_3_2/tests/security/open_basedir_parse_ini_file.phpt
Property changes on: php/php-src/branches/PHP_5_3_2
___________________________________________________________________
Modified: svn:mergeinfo
-
/php/php-src/branches/PHP_5_3:292504,292574,292594-292595,292611,292624,292630,292632-292635,292654,292677,292682-292683,292693,292719,292762,292765,292771,292777,292823,293051,293075,293114,293126,293131,293144,293146,293152,293176,293180,293216,293235,293253,293268,293341,293380,293400,293442,293447,293466,293487,293502,293538,293548,293558,293588,293590,293597,293627,293644,293653,293655,293699,293726-293728,293762,293974
/php/php-src/trunk:284726
+
/php/php-src/branches/PHP_5_3:292504,292574,292594-292595,292611,292624,292630,292632-292635,292654,292677,292682-292683,292693,292719,292762,292765,292771,292777,292823,293051,293075,293114,293126,293131,293144,293146,293152,293176,293180,293216,293235,293253,293268,293341,293380,293400,293442,293447,293466,293487,293502,293538,293548,293558,293588,293590,293597,293627,293644,293653,293655,293699,293726-293728,293732,293762,293974
/php/php-src/trunk:284726
Modified: php/php-src/branches/PHP_5_3_2/ext/curl/streams.c
===================================================================
--- php/php-src/branches/PHP_5_3_2/ext/curl/streams.c 2010-02-03 20:48:22 UTC (rev 294461)
+++ php/php-src/branches/PHP_5_3_2/ext/curl/streams.c 2010-02-03 20:49:03 UTC (rev 294462)
@@ -280,7 +280,7 @@
* have a FILE* associated with it.
* Otherwise, use the "smart" memory stream that will turn itself into a file
* when it gets large */
-#if !HAVE_FOPENCOOKIE
+#ifndef HAVE_FOPENCOOKIE
if (options & STREAM_WILL_CAST) {
curlstream->readbuffer.buf = php_stream_fopen_tmpfile();
} else
@@ -445,7 +445,7 @@
php_stream_to_zval(curlstream->readbuffer.buf, tmp);
add_assoc_zval(stream->wrapperdata, "readbuf", tmp);
-#if !HAVE_FOPENCOOKIE
+#ifndef HAVE_FOPENCOOKIE
if (options & STREAM_WILL_CAST) {
/* we will need to download the whole resource now,
* since we cannot get the actual FD for the download,
Property changes on: php/php-src/branches/PHP_5_3_2/ext/tidy/tests
___________________________________________________________________
Modified: svn:mergeinfo
-
/php/php-src/branches/PHP_5_3/ext/tidy/tests:292562,292566,292571,292574,292635,292719,292765,293146,293152,293176,293180,293216,293235,293253,293380,293400,293442,293447,293466,293487,293502,293538,293548,293558,293588,293590,293597,293627,293644,293653,293655,293699,293726-293728,293762
/php/php-src/trunk/ext/tidy/tests:284726,287798-287941
+
/php/php-src/branches/PHP_5_3/ext/tidy/tests:292562,292566,292571,292574,292635,292719,292765,293146,293152,293176,293180,293216,293235,293253,293380,293400,293442,293447,293466,293487,293502,293538,293548,293558,293588,293590,293597,293627,293644,293653,293655,293699,293726-293728,293732,293762
/php/php-src/trunk/ext/tidy/tests:284726,287798-287941
Modified: php/php-src/branches/PHP_5_3_2/main/streams/cast.c
===================================================================
--- php/php-src/branches/PHP_5_3_2/main/streams/cast.c 2010-02-03 20:48:22 UTC (rev 294461)
+++ php/php-src/branches/PHP_5_3_2/main/streams/cast.c 2010-02-03 20:49:03 UTC (rev 294462)
@@ -30,7 +30,7 @@
#include "php_streams_int.h"
/* Under BSD, emulate fopencookie using funopen */
-#if HAVE_FUNOPEN
+#if defined(HAVE_FUNOPEN) && !defined(HAVE_FOPENCOOKIE)
typedef struct {
int (*reader)(void *, char *, int);
int (*writer)(void *, const char *, int);
@@ -43,13 +43,14 @@
return funopen(cookie, funcs->reader, funcs->writer, funcs->seeker, funcs->closer);
}
# define HAVE_FOPENCOOKIE 1
+# define PHP_EMULATE_FOPENCOOKIE 1
# define PHP_STREAM_COOKIE_FUNCTIONS &stream_cookie_functions
-#elif HAVE_FOPENCOOKIE
+#elif defined(HAVE_FOPENCOOKIE)
# define PHP_STREAM_COOKIE_FUNCTIONS stream_cookie_functions
#endif
/* {{{ STDIO with fopencookie */
-#if HAVE_FUNOPEN
+#if defined(PHP_EMULATE_FOPENCOOKIE)
/* use our fopencookie emulation */
static int stream_cookie_reader(void *cookie, char *buffer, int size)
{
@@ -80,8 +81,7 @@
stream->fclose_stdiocast = PHP_STREAM_FCLOSE_NONE;
return php_stream_close(stream);
}
-
-#elif HAVE_FOPENCOOKIE
+#elif defined(HAVE_FOPENCOOKIE)
static ssize_t stream_cookie_reader(void *cookie, char *buffer, size_t size)
{
ssize_t ret;
@@ -96,7 +96,7 @@
return php_stream_write(((php_stream *)cookie), (char *)buffer, size);
}
-#ifdef COOKIE_SEEKER_USES_OFF64_T
+# ifdef COOKIE_SEEKER_USES_OFF64_T
static int stream_cookie_seeker(void *cookie, __off64_t *position, int whence)
{
TSRMLS_FETCH();
@@ -107,13 +107,13 @@
return -1;
return 0;
}
-#else
+# else
static int stream_cookie_seeker(void *cookie, off_t position, int whence)
{
TSRMLS_FETCH();
return php_stream_seek((php_stream *)cookie, position, whence);
}
-#endif
+# endif
static int stream_cookie_closer(void *cookie)
{
@@ -124,7 +124,7 @@
stream->fclose_stdiocast = PHP_STREAM_FCLOSE_NONE;
return php_stream_close(stream);
}
-#endif /* elif HAVE_FOPENCOOKIE */
+#endif /* elif defined(HAVE_FOPENCOOKIE) */
#if HAVE_FOPENCOOKIE
static COOKIE_IO_FUNCTIONS_T stream_cookie_functions =
Property changes on: php/php-src/branches/PHP_5_3_2/tests/security/open_basedir_parse_ini_file.phpt
___________________________________________________________________
Modified: svn:mergeinfo
-
/php/php-src/branches/PHP_5_3/tests/security/open_basedir_parse_ini_file.phpt:292562,292566,292571,292574,293146,293152,293176,293180,293216,293235,293253,293380,293400,293442,293447,293466,293487,293502,293538,293548,293558,293588,293590,293597,293627,293644,293653,293655,293699,293726-293728,293762
/php/php-src/trunk/tests/security/open_basedir_parse_ini_file.phpt:265951
+
/php/php-src/branches/PHP_5_3/tests/security/open_basedir_parse_ini_file.phpt:292562,292566,292571,292574,293146,293152,293176,293180,293216,293235,293253,293380,293400,293442,293447,293466,293487,293502,293538,293548,293558,293588,293590,293597,293627,293644,293653,293655,293699,293726-293728,293732,293762
/php/php-src/trunk/tests/security/open_basedir_parse_ini_file.phpt:265951