View | Details | Raw Unified | Return to bug 65422
Collapse All | Expand All

(-)/home/toni/ports/php4/files/patch-ext::curl::curl.c (+76 lines)
Line 0 Link Here
1
--- ext/curl.c.orig	Fri Mar 12 19:43:17 2004
2
+++ ext/curl/curl.c	Fri Mar 26 21:04:17 2004
3
@@ -16,7 +16,7 @@
4
    +----------------------------------------------------------------------+
5
 */
6
 
7
-/* $Id: curl.c,v 1.124.2.18 2004/03/12 17:43:17 iliaa Exp $ */
8
+/* $Id: curl.c,v 1.124.2.19 2004/03/26 19:04:17 iliaa Exp $ */
9
 
10
 #ifdef HAVE_CONFIG_H
11
 #include "config.h"
12
@@ -37,6 +37,11 @@
13
 #include <curl/curl.h>
14
 #include <curl/easy.h>
15
 
16
+/* As of curl 7.11.1 this is no longer defined inside curl.h */
17
+#ifndef HttpPost
18
+#define HttpPost curl_httppost
19
+#endif
20
+
21
 #define SMART_STR_PREALLOC 4096
22
 
23
 #include "ext/standard/php_smart_str.h"
24
@@ -133,7 +138,9 @@
25
 	REGISTER_CURL_CONSTANT(CURLOPT_FOLLOWLOCATION);
26
 	REGISTER_CURL_CONSTANT(CURLOPT_FTPASCII);
27
 	REGISTER_CURL_CONSTANT(CURLOPT_PUT);
28
+#if CURLOPT_MUTE != 0
29
 	REGISTER_CURL_CONSTANT(CURLOPT_MUTE);
30
+#endif
31
 	REGISTER_CURL_CONSTANT(CURLOPT_USERPWD);
32
 	REGISTER_CURL_CONSTANT(CURLOPT_PROXYUSERPWD);
33
 	REGISTER_CURL_CONSTANT(CURLOPT_RANGE);
34
@@ -506,6 +513,7 @@
35
 }
36
 /* }}} */
37
 
38
+#if CURLOPT_PASSWDFUNCTION != 0
39
 /* {{{ curl_passwd
40
  */
41
 static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
42
@@ -552,6 +560,7 @@
43
 	return ret;
44
 }
45
 /* }}} */
46
+#endif
47
 
48
 /* {{{ curl_free_string
49
  */
50
@@ -697,7 +706,9 @@
51
 		case CURLOPT_NETRC:
52
 		case CURLOPT_FOLLOWLOCATION:
53
 		case CURLOPT_PUT:
54
-		case CURLOPT_MUTE:
55
+#if CURLOPT_MUTE != 0
56
+		 case CURLOPT_MUTE:
57
+#endif
58
 		case CURLOPT_TIMEOUT:
59
 		case CURLOPT_FTP_USE_EPSV:
60
 		case CURLOPT_LOW_SPEED_LIMIT:
61
@@ -842,6 +853,7 @@
62
 			ch->handlers->write_header->func   = *zvalue;
63
 			ch->handlers->write_header->method = PHP_CURL_USER;
64
 			break;
65
+#if CURLOPT_PASSWDFUNCTION != 0
66
 		case CURLOPT_PASSWDFUNCTION:
67
 			if (ch->handlers->passwd) {
68
 				zval_ptr_dtor(&ch->handlers->passwd);
69
@@ -851,6 +863,7 @@
70
 			error = curl_easy_setopt(ch->cp, CURLOPT_PASSWDFUNCTION, curl_passwd);
71
 			error = curl_easy_setopt(ch->cp, CURLOPT_PASSWDDATA,     (void *) ch);
72
 			break;
73
+#endif
74
 		case CURLOPT_POSTFIELDS:
75
 			if (Z_TYPE_PP(zvalue) == IS_ARRAY || Z_TYPE_PP(zvalue) == IS_OBJECT) {
76
 				zval            **current;

Return to bug 65422