iliaa Mon Mar 22 13:43:18 2004 EDT
Modified files:
/php-src/ext/curl interface.c
Log:
Fixes to allow curl extension to compile against libcurl 7.11.1
http://cvs.php.net/diff.php/php-src/ext/curl/interface.c?r1=1.43&r2=1.44&ty=u
Index: php-src/ext/curl/interface.c
diff -u php-src/ext/curl/interface.c:1.43 php-src/ext/curl/interface.c:1.44
--- php-src/ext/curl/interface.c:1.43 Fri Mar 12 15:04:31 2004
+++ php-src/ext/curl/interface.c Mon Mar 22 13:42:03 2004
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: interface.c,v 1.43 2004/03/12 20:04:31 sterling Exp $ */
+/* $Id: interface.c,v 1.44 2004/03/22 18:42:03 iliaa Exp $ */
#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
@@ -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 @@
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 @@
}
/* }}} */
+#if CURLOPT_PASSWDFUNCTION != 0
/* {{{ curl_passwd
*/
static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
@@ -639,6 +647,7 @@
return ret;
}
/* }}} */
+#endif
/* {{{ curl_free_string
*/
@@ -850,7 +859,9 @@
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 @@
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 @@
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;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php