diff options
author | Lior Kaplan <kaplanlior@gmail.com> | 2014-01-11 13:43:40 +0200 |
---|---|---|
committer | Lior Kaplan <kaplanlior@gmail.com> | 2014-01-11 13:43:40 +0200 |
commit | 650fb41a77b3a24ab4130b05fff243b64b241877 (patch) | |
tree | b64f1cfd733f03ce1db807733ddf87ac8d62a903 /main | |
parent | 5a58c4dae727fbc8bd92770c2708baf9e7688857 (diff) | |
download | php-650fb41a77b3a24ab4130b05fff243b64b241877.tar.gz |
Imported Upstream version 5.5.8+dfsgupstream/5.5.8+dfsg
Diffstat (limited to 'main')
-rw-r--r-- | main/main.c | 19 | ||||
-rw-r--r-- | main/php_config.h.in | 3 | ||||
-rw-r--r-- | main/php_version.h | 6 | ||||
-rw-r--r-- | main/streams/plain_wrapper.c | 12 | ||||
-rw-r--r-- | main/streams/xp_socket.c | 2 |
5 files changed, 32 insertions, 10 deletions
diff --git a/main/main.c b/main/main.c index 5942b23f7..ce31cae43 100644 --- a/main/main.c +++ b/main/main.c @@ -1929,6 +1929,23 @@ int php_register_extensions(zend_module_entry **ptr, int count TSRMLS_DC) } return SUCCESS; } + +/* A very long time ago php_module_startup() was refactored in a way + * which broke calling it with more than one additional module. + * This alternative to php_register_extensions() works around that + * by walking the shallower structure. + * + * See algo: https://bugs.php.net/bug.php?id=63159 + */ +static int php_register_extensions_bc(zend_module_entry *ptr, int count TSRMLS_DC) +{ + while (count--) { + if (zend_register_internal_module(ptr++ TSRMLS_CC) == NULL) { + return FAILURE; + } + } + return SUCCESS; +} /* }}} */ #if defined(PHP_WIN32) && _MSC_VER >= 1400 @@ -2199,7 +2216,7 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod } /* start additional PHP extensions */ - php_register_extensions(&additional_modules, num_additional_modules TSRMLS_CC); + php_register_extensions_bc(additional_modules, num_additional_modules TSRMLS_CC); /* load and startup extensions compiled as shared objects (aka DLLs) as requested by php.ini entries diff --git a/main/php_config.h.in b/main/php_config.h.in index 60117315b..f8c072fae 100644 --- a/main/php_config.h.in +++ b/main/php_config.h.in @@ -374,6 +374,9 @@ /* */ #undef HAVE_ADABAS +/* Whether you have AI_V4MAPPED */ +#undef HAVE_AI_V4MAPPED + /* whether the compiler supports __alignof__ */ #undef HAVE_ALIGNOF diff --git a/main/php_version.h b/main/php_version.h index 710241b6c..65eda1ff5 100644 --- a/main/php_version.h +++ b/main/php_version.h @@ -2,7 +2,7 @@ /* edit configure.in to change version number */ #define PHP_MAJOR_VERSION 5 #define PHP_MINOR_VERSION 5 -#define PHP_RELEASE_VERSION 7 +#define PHP_RELEASE_VERSION 8 #define PHP_EXTRA_VERSION "" -#define PHP_VERSION "5.5.7" -#define PHP_VERSION_ID 50507 +#define PHP_VERSION "5.5.8" +#define PHP_VERSION_ID 50508 diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index 39df31a17..02f46ab27 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -78,11 +78,7 @@ PHPAPI int php_stream_parse_fopen_modes(const char *mode, int *open_flags) /* unknown mode */ return FAILURE; } -#if defined(O_NONBLOCK) - if (strchr(mode, 'n')) { - flags |= O_NONBLOCK; - } -#endif + if (strchr(mode, '+')) { flags |= O_RDWR; } else if (flags) { @@ -91,6 +87,12 @@ PHPAPI int php_stream_parse_fopen_modes(const char *mode, int *open_flags) flags |= O_RDONLY; } +#if defined(O_NONBLOCK) + if (strchr(mode, 'n')) { + flags |= O_NONBLOCK; + } +#endif + #if defined(_O_TEXT) && defined(O_BINARY) if (strchr(mode, 't')) { flags |= _O_TEXT; diff --git a/main/streams/xp_socket.c b/main/streams/xp_socket.c index a9c050f26..34a106e28 100644 --- a/main/streams/xp_socket.c +++ b/main/streams/xp_socket.c @@ -426,7 +426,7 @@ static int php_sockop_cast(php_stream *stream, int castas, void **ret TSRMLS_DC) case PHP_STREAM_AS_FD: case PHP_STREAM_AS_SOCKETD: if (ret) - *(int*)ret = sock->socket; + *(php_socket_t *)ret = sock->socket; return SUCCESS; default: return FAILURE; |