X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_request_int.h;h=ff220ca74b370c652f2ec462a2e5fce2f6573918;hp=e7449640f30efe3ea2eec981201b73b2fc2c0cf7;hb=ad5f896b03adaa073134a00108a9cdf00720673a;hpb=833996197be90565b5bf497aa28226ddf10fb575 diff --git a/php_http_request_int.h b/php_http_request_int.h index e744964..ff220ca 100644 --- a/php_http_request_int.h +++ b/php_http_request_int.h @@ -6,7 +6,7 @@ | modification, are permitted provided that the conditions mentioned | | in the accompanying LICENSE file are met. | +--------------------------------------------------------------------+ - | Copyright (c) 2004-2006, Michael Wallner | + | Copyright (c) 2004-2010, Michael Wallner | +--------------------------------------------------------------------+ */ @@ -18,25 +18,11 @@ # include # else /* !PHP_WIN32 */ # if defined(HTTP_HAVE_OPENSSL) -# if defined(HAVE_OPENSSL_CRYPTO_H) -# define HTTP_NEED_OPENSSL_TSL -# include -# else -# warning \ - "libcurl was compiled with OpenSSL support, but configure could not find " \ - "openssl/crypto.h; thus no SSL crypto locking callbacks will be set, which may " \ - "cause random crashes on SSL requests" -# endif +# define HTTP_NEED_OPENSSL_TSL +# include # elif defined(HTTP_HAVE_GNUTLS) -# if defined(HAVE_GCRYPT_H) -# define HTTP_NEED_GNUTLS_TSL -# include -# else -# warning \ - "libcurl was compiled with GnuTLS support, but configure could not find " \ - "gcrypt.h; thus no SSL crypto locking callbacks will be set, which may " \ - "cause random crashes on SSL requests" -# endif +# define HTTP_NEED_GNUTLS_TSL +# include # else # warning \ "libcurl was compiled with SSL support, but configure could not determine which" \ @@ -46,10 +32,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) \ @@ -58,13 +40,13 @@ HTTP_CURL_OPT_STRING_EX(K+lenof("CURLOPT_KEY")+ldiff, OPTION, obdc); \ } #define HTTP_CURL_OPT_STRING_EX(keyname, optname, obdc) \ - if (!strcasecmp(key, keyname)) { \ - zval *copy = http_request_option_cache_ex(request, keyname, strlen(keyname)+1, 0, zval_copy(IS_STRING, *param)); \ + if (!strcasecmp(key.str, keyname)) { \ + zval *copy = http_request_option_cache_ex(request, keyname, strlen(keyname)+1, 0, http_zsep(IS_STRING, *param)); \ if (obdc) { \ HTTP_CHECK_OPEN_BASEDIR(Z_STRVAL_P(copy), return FAILURE); \ } \ HTTP_CURL_OPT(optname, Z_STRVAL_P(copy)); \ - key = NULL; \ + zval_ptr_dtor(©); \ continue; \ } #define HTTP_CURL_OPT_LONG(OPTION, ldiff) \ @@ -73,11 +55,10 @@ HTTP_CURL_OPT_LONG_EX(K+lenof("CURLOPT_KEY")+ldiff, OPTION); \ } #define HTTP_CURL_OPT_LONG_EX(keyname, optname) \ - if (!strcasecmp(key, keyname)) { \ - zval *copy = zval_copy(IS_LONG, *param); \ + if (!strcasecmp(key.str, keyname)) { \ + zval *copy = http_zsep(IS_LONG, *param); \ HTTP_CURL_OPT(optname, Z_LVAL_P(copy)); \ - key = NULL; \ - zval_free(©); \ + zval_ptr_dtor(©); \ continue; \ }