From: Ilia Alshanetsky Date: Fri, 3 Nov 2006 14:53:27 +0000 (+0000) Subject: MFB: Fixed bug #39354 (Allow building of curl extension against libcurl X-Git-Tag: RELEASE_1_0_0RC1~1146 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0311ffef1f1bb21bb09d0164327a6091b8421990;p=php MFB: Fixed bug #39354 (Allow building of curl extension against libcurl 7.16.0) --- diff --git a/ext/curl/interface.c b/ext/curl/interface.c index a70950e9bf..05add1a614 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -367,7 +367,9 @@ PHP_MINIT_FUNCTION(curl) REGISTER_CURL_CONSTANT(CURLOPT_FTPAPPEND); REGISTER_CURL_CONSTANT(CURLOPT_NETRC); REGISTER_CURL_CONSTANT(CURLOPT_FOLLOWLOCATION); +#if CURLOPT_FTPASCII != 0 REGISTER_CURL_CONSTANT(CURLOPT_FTPASCII); +#endif REGISTER_CURL_CONSTANT(CURLOPT_PUT); #if CURLOPT_MUTE != 0 REGISTER_CURL_CONSTANT(CURLOPT_MUTE); @@ -407,7 +409,9 @@ PHP_MINIT_FUNCTION(curl) REGISTER_CURL_CONSTANT(CURLOPT_FILETIME); REGISTER_CURL_CONSTANT(CURLOPT_WRITEFUNCTION); REGISTER_CURL_CONSTANT(CURLOPT_READFUNCTION); +#if CURLOPT_PASSWDFUNCTION != 0 REGISTER_CURL_CONSTANT(CURLOPT_PASSWDFUNCTION); +#endif REGISTER_CURL_CONSTANT(CURLOPT_HEADERFUNCTION); REGISTER_CURL_CONSTANT(CURLOPT_MAXREDIRS); REGISTER_CURL_CONSTANT(CURLOPT_MAXCONNECTS); @@ -1155,12 +1159,13 @@ PHP_FUNCTION(curl_copy_handle) dupch->handlers->write_header->fp = ch->handlers->write_header->fp; dupch->handlers->read->fp = ch->handlers->read->fp; dupch->handlers->read->fd = ch->handlers->read->fd; - +#if CURLOPT_PASSWDDATA != 0 if (ch->handlers->passwd) { zval_add_ref(&ch->handlers->passwd); dupch->handlers->passwd = ch->handlers->passwd; curl_easy_setopt(ch->cp, CURLOPT_PASSWDDATA, (void *) dupch); } +#endif if (ch->handlers->write->func_name) { zval_add_ref(&ch->handlers->write->func_name); dupch->handlers->write->func_name = ch->handlers->write->func_name;