diff options
author | Pierre Joye <pajoye@php.net> | 2010-01-25 14:47:19 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2010-01-25 14:47:19 +0000 |
commit | 5eb4db5e8fa197339fdd28f23f447da777623f2b (patch) | |
tree | ca97e2057c87526a338b9ec6df67a2c6a6d8d085 /Zend/zend_extensions.c | |
parent | d0ab70458dcb98d5c7de2b6677f571d9fbfca043 (diff) | |
download | php-git-5eb4db5e8fa197339fdd28f23f447da777623f2b.tar.gz |
- Ensure that stderr output are not buffered, portability for tests
Diffstat (limited to 'Zend/zend_extensions.c')
-rw-r--r-- | Zend/zend_extensions.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Zend/zend_extensions.c b/Zend/zend_extensions.c index 232239763c..f3e9c32e3b 100644 --- a/Zend/zend_extensions.c +++ b/Zend/zend_extensions.c @@ -35,6 +35,10 @@ int zend_load_extension(const char *path) if (!handle) { #ifndef ZEND_WIN32 fprintf(stderr, "Failed loading %s: %s\n", path, DL_ERROR()); +/* See http://support.microsoft.com/kb/190351 */ +#ifdef PHP_WIN32 + fflush(stderr); +#endif #else fprintf(stderr, "Failed loading %s\n", path); #endif @@ -51,6 +55,10 @@ int zend_load_extension(const char *path) } if (!extension_version_info || !new_extension) { fprintf(stderr, "%s doesn't appear to be a valid Zend extension\n", path); +/* See http://support.microsoft.com/kb/190351 */ +#ifdef PHP_WIN32 + fflush(stderr); +#endif DL_UNLOAD(handle); return FAILURE; } @@ -64,6 +72,10 @@ int zend_load_extension(const char *path) new_extension->name, extension_version_info->zend_extension_api_no, ZEND_EXTENSION_API_NO); +/* See http://support.microsoft.com/kb/190351 */ +#ifdef PHP_WIN32 + fflush(stderr); +#endif DL_UNLOAD(handle); return FAILURE; } else if (extension_version_info->zend_extension_api_no < ZEND_EXTENSION_API_NO) { @@ -76,6 +88,10 @@ int zend_load_extension(const char *path) new_extension->author, new_extension->URL, new_extension->name); +/* See http://support.microsoft.com/kb/190351 */ +#ifdef PHP_WIN32 + fflush(stderr); +#endif DL_UNLOAD(handle); return FAILURE; } @@ -83,6 +99,10 @@ int zend_load_extension(const char *path) (!new_extension->build_id_check || new_extension->build_id_check(ZEND_EXTENSION_BUILD_ID) != SUCCESS)) { fprintf(stderr, "Cannot load %s - it was built with configuration %s, whereas running engine is %s\n", new_extension->name, extension_version_info->build_id, ZEND_EXTENSION_BUILD_ID); +/* See http://support.microsoft.com/kb/190351 */ +#ifdef PHP_WIN32 + fflush(stderr); +#endif DL_UNLOAD(handle); return FAILURE; } @@ -90,6 +110,10 @@ int zend_load_extension(const char *path) return zend_register_extension(new_extension, handle); #else fprintf(stderr, "Extensions are not supported on this platform.\n"); +/* See http://support.microsoft.com/kb/190351 */ +#ifdef PHP_WIN32 + fflush(stderr); +#endif return FAILURE; #endif } |