]> granicus.if.org Git - php/commitdiff
fix #40169 (CURLOPT_TCP_NODELAY only available in curl >= 7.11.2)
authorAntony Dovgal <tony2001@php.net>
Fri, 19 Jan 2007 15:38:02 +0000 (15:38 +0000)
committerAntony Dovgal <tony2001@php.net>
Fri, 19 Jan 2007 15:38:02 +0000 (15:38 +0000)
ext/curl/interface.c

index 15c85a3c3ee4c96beb1dfd58104e934fc32e9d6f..6fa2d418850577c275c8ac45da61a07ed730c0d4 100644 (file)
@@ -450,7 +450,9 @@ PHP_MINIT_FUNCTION(curl)
        REGISTER_CURL_CONSTANT(CURLOPT_PROXYPORT);
        REGISTER_CURL_CONSTANT(CURLOPT_UNRESTRICTED_AUTH);
        REGISTER_CURL_CONSTANT(CURLOPT_FTP_USE_EPRT);
+#if LIBCURL_VERSION_NUM > 0x070b01 /* CURLOPT_TCP_NODELAY is available since curl 7.11.2 */
        REGISTER_CURL_CONSTANT(CURLOPT_TCP_NODELAY);
+#endif
        REGISTER_CURL_CONSTANT(CURLOPT_HTTP200ALIASES);
        REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFMODSINCE);
        REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFUNMODSINCE);
@@ -1269,10 +1271,12 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
                case CURLOPT_PORT:
                case CURLOPT_AUTOREFERER:
                case CURLOPT_COOKIESESSION:
+#if LIBCURL_VERSION_NUM > 0x070b01 /* CURLOPT_TCP_NODELAY is available since curl 7.11.2 */
                case CURLOPT_TCP_NODELAY:
                        convert_to_long_ex(zvalue);
                        error = curl_easy_setopt(ch->cp, option, Z_LVAL_PP(zvalue));
                        break;
+#endif
                case CURLOPT_FOLLOWLOCATION:
                        convert_to_long_ex(zvalue);
                        if (PG(open_basedir) && *PG(open_basedir)) {