From: Michael Wallner Date: Wed, 3 Oct 2007 20:32:52 +0000 (+0000) Subject: - fix CURLOPT_TIMEOUT_MS support (available since 7.16.2) X-Git-Tag: RELEASE_2_0_0a1~1669 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=25f77827dddb336b9116ad43a2c77c2466838488;p=php - fix CURLOPT_TIMEOUT_MS support (available since 7.16.2) --- diff --git a/ext/curl/interface.c b/ext/curl/interface.c index d47dad8ece..57467ffc19 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -385,7 +385,7 @@ PHP_MINIT_FUNCTION(curl) REGISTER_CURL_CONSTANT(CURLOPT_PROXYUSERPWD); REGISTER_CURL_CONSTANT(CURLOPT_RANGE); REGISTER_CURL_CONSTANT(CURLOPT_TIMEOUT); -#ifdef CURLOPT_TIMEOUT_MS +#if LIBCURL_VERSION_NUM > 0x071002 REGISTER_CURL_CONSTANT(CURLOPT_TIMEOUT_MS); #endif REGISTER_CURL_CONSTANT(CURLOPT_POSTFIELDS); @@ -431,7 +431,7 @@ PHP_MINIT_FUNCTION(curl) REGISTER_CURL_CONSTANT(CURLOPT_RANDOM_FILE); REGISTER_CURL_CONSTANT(CURLOPT_EGDSOCKET); REGISTER_CURL_CONSTANT(CURLOPT_CONNECTTIMEOUT); -#ifdef CURLOPT_CONNECTTIMEOUT_MS +#if LIBCURL_VERSION_NUM > 0x071002 REGISTER_CURL_CONSTANT(CURLOPT_CONNECTTIMEOUT_MS); #endif REGISTER_CURL_CONSTANT(CURLOPT_SSL_VERIFYPEER); @@ -1239,7 +1239,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu case CURLOPT_MUTE: #endif case CURLOPT_TIMEOUT: -#ifdef CURLOPT_TIMEOUT_MS +#if LIBCURL_VERSION_NUM > 0x071002 case CURLOPT_TIMEOUT_MS: #endif case CURLOPT_FTP_USE_EPSV: @@ -1258,7 +1258,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu case CURLOPT_FRESH_CONNECT: case CURLOPT_FORBID_REUSE: case CURLOPT_CONNECTTIMEOUT: -#ifdef CURLOPT_CONNECTTIMEOUT_MS +#if LIBCURL_VERSION_NUM > 0x071002 case CURLOPT_CONNECTTIMEOUT_MS: #endif case CURLOPT_SSL_VERIFYHOST: