From: Michael Wallner Date: Wed, 31 Jan 2007 08:32:33 +0000 (+0000) Subject: - move some definitions around X-Git-Tag: RELEASE_1_5_0_RC1~17 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=302498d96ed22a09da4375bd955d07f04b6b36c4;p=m6w6%2Fext-http - move some definitions around --- diff --git a/http_functions.c b/http_functions.c index c4e358d..8941a93 100644 --- a/http_functions.c +++ b/http_functions.c @@ -56,10 +56,6 @@ PHP_FUNCTION(http_date) } /* }}} */ -#if PHP_MAJOR_VERSION == 4 && PHP_MINOR_VERSION == 3 && PHP_RELEASE_VERSION < 10 -# define php_url_parse_ex(u, l) php_url_parse(u) -#endif - /* {{{ proto string http_build_url([mixed url[, mixed parts[, int flags = HTTP_URL_REPLACE[, array &new_url]]]]) Build an URL. */ PHP_FUNCTION(http_build_url) diff --git a/http_request_datashare_api.c b/http_request_datashare_api.c index 0e7dbf6..6c70f3f 100644 --- a/http_request_datashare_api.c +++ b/http_request_datashare_api.c @@ -25,13 +25,6 @@ # include "php_http_persistent_handle_api.h" #endif -#ifndef HAVE_CURL_SHARE_STRERROR -# define curl_share_strerror(dummy) "unknown error" -#endif -#ifndef HAVE_CURL_EASY_STRERROR -# define curl_easy_strerror(dummy) "unknown error" -#endif - #ifdef HTTP_HAVE_PERSISTENT_HANDLES # define HTTP_CURL_SHARE_CTOR(ch) (SUCCESS == http_persistent_handle_acquire("http_request_datashare", &(ch))) # define HTTP_CURL_SHARE_DTOR(chp) http_persistent_handle_release("http_request_datashare", (chp)) diff --git a/http_request_pool_api.c b/http_request_pool_api.c index 29df94f..83413d2 100644 --- a/http_request_pool_api.c +++ b/http_request_pool_api.c @@ -29,10 +29,6 @@ # define HTTP_DEBUG_REQPOOLS 0 #endif -#ifndef HAVE_CURL_MULTI_STRERROR -# define curl_multi_strerror(dummy) "unknown error" -#endif - #ifdef HTTP_HAVE_PERSISTENT_HANDLES # define HTTP_CURL_MULTI_CTOR(ch) (SUCCESS == http_persistent_handle_acquire("http_request_pool", &(ch))) # define HTTP_CURL_MULTI_DTOR(chp) http_persistent_handle_release("http_request_pool", (chp)) diff --git a/php_http_request_int.h b/php_http_request_int.h index 7bf5db1..ae6c125 100644 --- a/php_http_request_int.h +++ b/php_http_request_int.h @@ -46,10 +46,6 @@ # endif /* PHP_WIN32 */ #endif /* ZTS && HTTP_HAVE_SSL */ -#ifndef HAVE_CURL_EASY_STRERROR -# define curl_easy_strerror(dummy) "unknown error" -#endif - #define HTTP_CURL_OPT(OPTION, p) curl_easy_setopt((request->ch), OPTION, (p)) #define HTTP_CURL_OPT_STRING(OPTION, ldiff, obdc) \ diff --git a/php_http_std_defs.h b/php_http_std_defs.h index cf3e15f..8ca7c73 100644 --- a/php_http_std_defs.h +++ b/php_http_std_defs.h @@ -231,7 +231,6 @@ typedef int STATUS; # define ACC_PROP_PUBLIC(flags) (flags & ZEND_ACC_PUBLIC) # define ACC_PROP(ce, flags) (ACC_PROP_PUBLIC(flags) || ACC_PROP_PRIVATE(ce, flags) || ACC_PROP_PROTECTED(ce, flags)) -# define SET_EH_THROW() SET_EH_THROW_EX(zend_exception_get_default()) # define SET_EH_THROW_HTTP() SET_EH_THROW_EX(http_exception_get_default()) # define SET_EH_THROW_EX(ex) php_set_error_handling(EH_THROW, ex TSRMLS_CC) # define SET_EH_NORMAL() php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC) @@ -259,6 +258,10 @@ typedef int STATUS; # define ZEND_EXCEPTION_GET_DEFAULT() zend_exception_get_default() #endif +#if PHP_MAJOR_VERSION == 4 && PHP_MINOR_VERSION == 3 && PHP_RELEASE_VERSION < 10 +# define php_url_parse_ex(u, l) php_url_parse(u) +#endif + #ifndef E_THROW # define E_THROW 0 #endif @@ -368,6 +371,16 @@ typedef int STATUS; #endif /* HTTP_HAVE_CURL */ +#ifndef HAVE_CURL_SHARE_STRERROR +# define curl_share_strerror(dummy) "unknown error" +#endif +#ifndef HAVE_CURL_EASY_STRERROR +# define curl_easy_strerror(dummy) "unknown error" +#endif +#ifndef HAVE_CURL_MULTI_STRERROR +# define curl_multi_strerror(dummy) "unknown error" +#endif + #ifndef TSRMLS_FETCH_FROM_CTX # ifdef ZTS # define TSRMLS_FETCH_FROM_CTX(ctx) void ***tsrm_ls = (void ***) ctx