]> granicus.if.org Git - php/commitdiff
Fix bug #23048, CURLOPT_ENCODING is not always available
authorfoobar <sniper@php.net>
Fri, 4 Apr 2003 16:18:15 +0000 (16:18 +0000)
committerfoobar <sniper@php.net>
Fri, 4 Apr 2003 16:18:15 +0000 (16:18 +0000)
ext/curl/curl.c

index b7a470474a99e2f7cb96e45f3f7ec48724f614ef..d0e1244fa1c83e0ebd35297887634f3438fb7c0f 100644 (file)
@@ -191,7 +191,9 @@ PHP_MINIT_FUNCTION(curl)
        REGISTER_CURL_CONSTANT(CURLOPT_SSLENGINE);
        REGISTER_CURL_CONSTANT(CURLOPT_SSLENGINE_DEFAULT);
        REGISTER_CURL_CONSTANT(CURLOPT_CRLF);
+#ifdef CURLOPT_ENCODING
        REGISTER_CURL_CONSTANT(CURLOPT_ENCODING);
+#endif
                
        /* Constants effecting the way CURLOPT_CLOSEPOLICY works */
        REGISTER_CURL_CONSTANT(CURLCLOSEPOLICY_LEAST_RECENTLY_USED);
@@ -740,8 +742,10 @@ PHP_FUNCTION(curl_setopt)
                case CURLOPT_SSLKEYTYPE: 
                case CURLOPT_SSLKEYPASSWD: 
                case CURLOPT_SSLENGINE: 
-               case CURLOPT_SSLENGINE_DEFAULT:
-               case CURLOPT_ENCODING: {
+#ifdef CURLOPT_ENCODING
+               case CURLOPT_ENCODING: 
+#endif
+               case CURLOPT_SSLENGINE_DEFAULT: {
                        char *copystr = NULL;
        
                        convert_to_string_ex(zvalue);