* cpp stuff
authorMichael Wallner <mike@php.net>
Wed, 9 Mar 2005 13:34:36 +0000 (13:34 +0000)
committerMichael Wallner <mike@php.net>
Wed, 9 Mar 2005 13:34:36 +0000 (13:34 +0000)
http.c
http_api.c
http_curl_api.c
http_functions.c
http_methods.c
php_http.h

diff --git a/http.c b/http.c
index 155d0fe66d01dd8504cc701aa405151edaa1e5ef..43f15461e684ea794ea6e386c4644836bd5378ee 100644 (file)
--- a/http.c
+++ b/http.c
 
 /* $Id$ */
 
-#define _WINSOCKAPI_
-#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
 #ifdef HAVE_CONFIG_H
 #      include "config.h"
 #endif
 
+#ifdef HTTP_HAVE_CURL
+#      ifdef PHP_WIN32
+#              define _WINSOCKAPI_
+#              include <winsock2.h>
+#              include <sys/types.h>
+#      endif
+#      include <curl/curl.h>
+#endif
+
 #include "php.h"
 #include "php_ini.h"
 #include "snprintf.h"
 #endif
 
 #ifdef HTTP_HAVE_CURL
-
-#      ifdef PHP_WIN32
-#              include <winsock2.h>
-#              include <sys/types.h>
-#      endif
-
-#      include <curl/curl.h>
-
 /* {{{ ARG_INFO */
 #      ifdef ZEND_BEGIN_ARG_INFO
 ZEND_BEGIN_ARG_INFO(http_request_info_ref_3, 0)
index af42cd5e641cb68a785d72176a967899e78abd92..554c648ac1dbd7ef1135a81b86ff05347901f9bb 100644 (file)
@@ -15,9 +15,6 @@
 
 /* $Id$ */
 
-#define _WINSOCKAPI_
-#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
-
 #ifdef HAVE_CONFIG_H
 #      include "config.h"
 #endif
@@ -25,6 +22,7 @@
 #include <ctype.h>
 
 #ifdef PHP_WIN32
+#      define _WINSOCKAPI_
 #      include <winsock2.h>
 #elif defined(HAVE_NETDB_H)
 #      include <netdb.h>
index 08d543dbae5c82acf53c0d077ffc813eb1bb612e..b4a8077b299cb30c361437efd84fdae0dd8ffcc3 100644 (file)
@@ -21,7 +21,6 @@
 
 #ifdef PHP_WIN32
 #      define _WINSOCKAPI_
-#      define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 #      include <winsock2.h>
 #      include <sys/types.h>
 #endif
index 2935626ecfb4eff1483540cd63d4fbc5dbc310e5..1cffa1757717e5c2ef3222adc38ffe0484567860 100644 (file)
@@ -15,9 +15,6 @@
 
 /* $Id$ */
 
-#define _WINSOCKAPI_
-#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
-
 #ifdef HAVE_CONFIG_H
 #      include "config.h"
 #endif
@@ -608,7 +605,7 @@ PHP_FUNCTION(http_split_response)
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not parse HTTP response");
                RETURN_FALSE;
        }
-       
+
        array_init(return_value);
        add_index_zval(return_value, 0, zheaders);
        add_index_zval(return_value, 1, zbody);
index 4953d27a6040ac2021d67ab1ebc334502ae5be63..1365fcf4c6a15c7630908ecc1e6f91094e3cc6b1 100644 (file)
@@ -15,9 +15,6 @@
 
 /* $Id$ */
 
-#define _WINSOCKAPI_
-#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
-
 #ifdef HAVE_CONFIG_H
 #      include "config.h"
 #endif
index e9d6616bbd4ceae848f2a42918e86336c0a8f3e6..1234f9ba273418c9c5c1ecd699bf4c7ecb464e2c 100644 (file)
@@ -55,7 +55,7 @@ typedef enum {
        HTTP_POST,
 } http_request_method;
 
-#endif
+#endif /* HTTP_HAVE _CURL */
 
 PHP_METHOD(HTTPi, date);
 PHP_METHOD(HTTPi, absoluteURI);
@@ -79,7 +79,7 @@ PHP_METHOD(HTTPi, get);
 PHP_METHOD(HTTPi, head);
 PHP_METHOD(HTTPi, postData);
 PHP_METHOD(HTTPi, postArray);
-#endif
+#endif /* HTTP_HAVE_CURL */
 PHP_METHOD(HTTPi, authBasic);
 PHP_METHOD(HTTPi, authBasicCallback);
 
@@ -166,12 +166,12 @@ PHP_FUNCTION(http_get);
 PHP_FUNCTION(http_head);
 PHP_FUNCTION(http_post_data);
 PHP_FUNCTION(http_post_array);
-#endif
+#endif /* HTTP_HAVE_CURL */
 PHP_FUNCTION(http_auth_basic);
 PHP_FUNCTION(http_auth_basic_cb);
 #ifndef ZEND_ENGINE_2
 PHP_FUNCTION(http_build_query);
-#endif
+#endif /* ZEND_ENGINE_2 */
 PHP_FUNCTION(ob_httpetaghandler);
 
 PHP_MINIT_FUNCTION(http);
@@ -196,7 +196,7 @@ ZEND_BEGIN_MODULE_GLOBALS(http)
                size_t size;
        } curlbuf;
        zend_llist to_free;
-#endif
+#endif /* HTTP_HAVE_CURL */
 ZEND_END_MODULE_GLOBALS(http)
 
 #endif /* PHP_HTTP_H */