diff options
| author | Ilia Alshanetsky <iliaa@php.net> | 2004-03-22 18:42:03 +0000 |
|---|---|---|
| committer | Ilia Alshanetsky <iliaa@php.net> | 2004-03-22 18:42:03 +0000 |
| commit | 83e9b7eeeef79d5f3f7f3f9a79f0e26545be86a5 (patch) | |
| tree | 14ffedabadbb14d2103a62a793a6a35fa9f28f50 /ext/curl | |
| parent | fc419f10ef897cb4d686c2d99fd85009d8665ca6 (diff) | |
| download | php-git-83e9b7eeeef79d5f3f7f3f9a79f0e26545be86a5.tar.gz | |
Fixes to allow curl extension to compile against libcurl 7.11.1
Diffstat (limited to 'ext/curl')
| -rw-r--r-- | ext/curl/interface.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 6054633f17..e5418bc21b 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -39,6 +39,11 @@ #include <curl/curl.h> #include <curl/easy.h> +/* As of curl 7.11.1 this is no longer defined inside curl.h */ +#ifndef HttpPost +#define HttpPost curl_httppost +#endif + #define SMART_STR_PREALLOC 4096 #include "ext/standard/php_smart_str.h" @@ -146,7 +151,9 @@ PHP_MINIT_FUNCTION(curl) REGISTER_CURL_CONSTANT(CURLOPT_FOLLOWLOCATION); REGISTER_CURL_CONSTANT(CURLOPT_FTPASCII); REGISTER_CURL_CONSTANT(CURLOPT_PUT); +#if CURLOPT_MUTE != 0 REGISTER_CURL_CONSTANT(CURLOPT_MUTE); +#endif REGISTER_CURL_CONSTANT(CURLOPT_USERPWD); REGISTER_CURL_CONSTANT(CURLOPT_PROXYUSERPWD); REGISTER_CURL_CONSTANT(CURLOPT_RANGE); @@ -597,6 +604,7 @@ static size_t curl_write_header(char *data, size_t size, size_t nmemb, void *ctx } /* }}} */ +#if CURLOPT_PASSWDFUNCTION != 0 /* {{{ curl_passwd */ static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen) @@ -639,6 +647,7 @@ static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen) return ret; } /* }}} */ +#endif /* {{{ curl_free_string */ @@ -850,7 +859,9 @@ PHP_FUNCTION(curl_setopt) case CURLOPT_NETRC: case CURLOPT_FOLLOWLOCATION: case CURLOPT_PUT: - case CURLOPT_MUTE: +#if CURLOPT_MUTE != 0 + case CURLOPT_MUTE: +#endif case CURLOPT_TIMEOUT: case CURLOPT_FTP_USE_EPSV: case CURLOPT_LOW_SPEED_LIMIT: @@ -1005,6 +1016,7 @@ PHP_FUNCTION(curl_setopt) ch->handlers->write_header->func_name = *zvalue; ch->handlers->write_header->method = PHP_CURL_USER; break; +#if CURLOPT_PASSWDFUNCTION != 0 case CURLOPT_PASSWDFUNCTION: if (ch->handlers->passwd) { zval_ptr_dtor(&ch->handlers->passwd); @@ -1014,6 +1026,7 @@ PHP_FUNCTION(curl_setopt) error = curl_easy_setopt(ch->cp, CURLOPT_PASSWDFUNCTION, curl_passwd); error = curl_easy_setopt(ch->cp, CURLOPT_PASSWDDATA, (void *) ch); break; +#endif case CURLOPT_POSTFIELDS: if (Z_TYPE_PP(zvalue) == IS_ARRAY || Z_TYPE_PP(zvalue) == IS_OBJECT) { zval **current; |
