- reorder includes, always include php.h first
authorMichael Wallner <mike@php.net>
Tue, 19 Jul 2005 16:19:27 +0000 (16:19 +0000)
committerMichael Wallner <mike@php.net>
Tue, 19 Jul 2005 16:19:27 +0000 (16:19 +0000)
19 files changed:
http.c
http_api.c
http_auth_api.c
http_cache_api.c
http_date_api.c
http_exception_object.c
http_functions.c
http_headers_api.c
http_message_api.c
http_message_object.c
http_methods.c
http_request_api.c
http_request_object.c
http_request_pool_api.c
http_requestpool_object.c
http_response_object.c
http_send_api.c
http_url_api.c
http_util_object.c

diff --git a/http.c b/http.c
index 3e7baeb137242888f1ca33ca470bf7d78f1477e5..3b0588719324a8140363227e023e543f47552643 100644 (file)
--- a/http.c
+++ b/http.c
 #ifdef HAVE_CONFIG_H
 #      include "config.h"
 #endif
-
-#ifdef HTTP_HAVE_CURL
-#      ifdef PHP_WIN32
-#              include <winsock2.h>
-#      endif
-#      include <curl/curl.h>
-#endif
-
-#include <ctype.h>
-
 #include "php.h"
-#include "php_ini.h"
-#include "ext/standard/info.h"
 
 #include "SAPI.h"
+#include "php_ini.h"
+#include "ext/standard/info.h"
 
 #include "php_http.h"
 #include "php_http_std_defs.h"
 
 #include "phpstr/phpstr.h"
 
+#ifdef HTTP_HAVE_CURL
+#      ifdef PHP_WIN32
+#              include <winsock2.h>
+#      endif
+#      include <curl/curl.h>
+#endif
+
+#include <ctype.h>
+
 ZEND_DECLARE_MODULE_GLOBALS(http);
 HTTP_DECLARE_ARG_PASS_INFO();
 
index d943b0df01e3d6afbdae98a407c79267e48a530f..1773ce7bc1f702ae7edffc4bf3415cad849b3abf 100644 (file)
 #ifdef HAVE_CONFIG_H
 #      include "config.h"
 #endif
-
-#include <ctype.h>
-
 #include "php.h"
-#include "ext/standard/url.h"
 
 #include "SAPI.h"
+#include "ext/standard/url.h"
 
 #include "php_http.h"
 #include "php_http_std_defs.h"
@@ -37,6 +34,8 @@
 #      include "php_http_exception_object.h"
 #endif
 
+#include <ctype.h>
+
 ZEND_EXTERN_MODULE_GLOBALS(http);
 
 /* char *pretty_key(char *, size_t, zend_bool, zebd_bool) */
index 645d335ee5ade720303c62a49bc41c101b46add8..5e5bafc07ef3e6387800b494cd341961bc715a15 100644 (file)
 #ifdef HAVE_CONFIG_H
 #      include "config.h"
 #endif
-
 #include "php.h"
-#include "ext/standard/base64.h"
 
 #include "SAPI.h"
+#include "ext/standard/base64.h"
 
 #include "php_http.h"
 #include "php_http_api.h"
index a70feb0775145664c05aafb3ddf6b6a4119b84bf..4e1473a7f4345d3f0018ea44f4e786af39ee84b5 100644 (file)
 #ifdef HAVE_CONFIG_H
 #      include "config.h"
 #endif
-
 #include "php.h"
+
+#include "SAPI.h"
 #include "php_streams.h"
 #include "php_output.h"
 #include "ext/standard/md5.h"
 
-#include "SAPI.h"
-
 #include "php_http.h"
 #include "php_http_std_defs.h"
 #include "php_http_api.h"
index fc67a89f57b525163aa2b8e9a5a36aa3d7cae2c1..c59b2cfe4c00e172ec1cfa3af93c73b75f27748d 100644 (file)
 #ifdef HAVE_CONFIG_H
 #      include "config.h"
 #endif
-
-#include <ctype.h>
-
 #include "php.h"
+
 #include "php_http.h"
 #include "php_http_std_defs.h"
 
+#include <ctype.h>
+
 static int check_day(char *day, size_t len);
 static int check_month(char *month);
 static int check_tzone(char *tzone);
index 7ea4af57908448150589801c1dfff4e142686aff..af840465c116e035ce39640223c5ef875d4b0a11 100644 (file)
 #ifdef HAVE_CONFIG_H
 #      include "config.h"
 #endif
-
 #include "php.h"
 
-#include "php_http.h"
-#include "php_http_std_defs.h"
-
 #ifdef ZEND_ENGINE_2
 
-#include "php_http_exception_object.h"
 #include "zend_exceptions.h"
 
+#include "php_http.h"
+#include "php_http_std_defs.h"
+#include "php_http_exception_object.h"
+
 zend_class_entry *http_exception_object_ce;
 zend_function_entry http_exception_object_fe[] = {{NULL, NULL, NULL}};
 
 void _http_exception_object_init(INIT_FUNC_ARGS)
 {
        HTTP_REGISTER_CLASS(HttpException, http_exception_object, zend_exception_get_default(), 0);
-       
+
        HTTP_LONG_CONSTANT("HTTP_E_UNKNOWN", HTTP_E_UNKOWN);
        HTTP_LONG_CONSTANT("HTTP_E_PARSE", HTTP_E_PARSE);
        HTTP_LONG_CONSTANT("HTTP_E_HEADER", HTTP_E_HEADER);
index 4e67be7aee3fac005c0e2f083d096c94e0986b60..7612013c070aca40fb1c63f6c5bc14b28b547ea6 100644 (file)
 #ifdef HAVE_CONFIG_H
 #      include "config.h"
 #endif
-
 #include "php.h"
+
+#include "SAPI.h"
 #include "php_ini.h"
 #include "ext/standard/info.h"
 #include "ext/session/php_session.h"
 #include "ext/standard/php_string.h"
 
-#include "SAPI.h"
-
-#include "phpstr/phpstr.h"
-
 #include "php_http.h"
 #include "php_http_std_defs.h"
 #include "php_http_api.h"
@@ -42,6 +39,8 @@
 #include "php_http_send_api.h"
 #include "php_http_url_api.h"
 
+#include "phpstr/phpstr.h"
+
 ZEND_EXTERN_MODULE_GLOBALS(http)
 
 /* {{{ proto string http_date([int timestamp])
index 8c124cb46214a66d7e112a83482df1f93a872973..f264b68ae4c4ccd1771b2cc289869e959cd28eb5 100644 (file)
 #ifdef HAVE_CONFIG_H
 #      include "config.h"
 #endif
-
-#include <ctype.h>
-
 #include "php.h"
+
 #include "ext/standard/php_string.h"
 #include "ext/standard/url.h"
 
@@ -30,6 +28,8 @@
 #include "php_http_api.h"
 #include "php_http_headers_api.h"
 
+#include <ctype.h>
+
 /* {{{ static int http_sort_q(const void *, const void *) */
 static int http_sort_q(const void *a, const void *b TSRMLS_DC)
 {
index 47cd1ddd2bf28d3b5d3e33fa28338f6e944d7f7d..1cf8661546574505b5d3d1dd255713c585c2b058 100644 (file)
@@ -18,8 +18,8 @@
 #ifdef HAVE_CONFIG_H
 #      include "config.h"
 #endif
-
 #include "php.h"
+
 #include "php_http.h"
 #include "php_http_std_defs.h"
 #include "php_http_api.h"
index c26a2f196a3c595d8e238ad9b8dd3e826871ca67..c61999164749954a50e77ea1e71d2e7d95abb31f 100644 (file)
 #ifdef HAVE_CONFIG_H
 #      include "config.h"
 #endif
-
 #include "php.h"
 
+#ifdef ZEND_ENGINE_2
+
 #include "php_http.h"
 #include "php_http_std_defs.h"
 #include "php_http_message_object.h"
 
 #include "phpstr/phpstr.h"
 
-#ifdef ZEND_ENGINE_2
-
 #define http_message_object_declare_default_properties() _http_message_object_declare_default_properties(TSRMLS_C)
 static inline void _http_message_object_declare_default_properties(TSRMLS_D);
 #define http_message_object_read_prop _http_message_object_read_prop
index c18e5aec630aa7603f5e678ab23296862ed82b81..08959ed0c152c9c2ec0e490bc5e57de4b23543cf 100644 (file)
 #ifdef HAVE_CONFIG_H
 #      include "config.h"
 #endif
-
 #include "php.h"
+
+#ifdef ZEND_ENGINE_2
+
 #include "php_streams.h"
 
 #include "php_http.h"
 #include "php_http_requestpool_object.h"
 #include "php_http_exception_object.h"
 
-#ifdef ZEND_ENGINE_2
-
 #include "missing.h"
 
-ZEND_EXTERN_MODULE_GLOBALS(http)
+ZEND_EXTERN_MODULE_GLOBALS(http);
 
 /* {{{ HttpResponse */
 
index 24b1acc5a8bd3e0a3cd53f237f7cbbd5f916a158..3f77eff2ae55bc37e2ad541ed9bf1254a5f4e840 100644 (file)
 #ifdef HAVE_CONFIG_H
 #      include "config.h"
 #endif
+#include "php.h"
+
+#include "php_http.h"
+#include "php_http_std_defs.h"
+#include "php_http_api.h"
+#include "php_http_request_api.h"
+#include "php_http_url_api.h"
+
+#include "phpstr/phpstr.h"
 
 #ifdef PHP_WIN32
 #      include <winsock2.h>
 
 #include <curl/curl.h>
 
-#include "phpstr/phpstr.h"
-
-#include "php.h"
-#include "php_http.h"
-#include "php_http_std_defs.h"
-#include "php_http_api.h"
-#include "php_http_request_api.h"
-#include "php_http_url_api.h"
+ZEND_EXTERN_MODULE_GLOBALS(http);
 
 #ifndef HTTP_CURL_USE_ZEND_MM
 #      define HTTP_CURL_USE_ZEND_MM 0
 #endif
 
-ZEND_EXTERN_MODULE_GLOBALS(http)
-
 #if LIBCURL_VERSION_NUM < 0x070c00
 #      define curl_easy_strerror(code) HTTP_G(request).error
 #endif
@@ -507,7 +507,7 @@ PHP_HTTP_API STATUS _http_request_init(CURL *ch, http_request_method meth, char
        } else {
                HTTP_CURL_OPT(COOKIEFILE, NULL);
        }
-       
+
        /* cookiestore, read initial cookies from that file and store cookies back into that file */
        if ((zoption = http_curl_getopt(options, "cookiestore", IS_STRING)) && Z_STRLEN_P(zoption)) {
                HTTP_CURL_OPT(COOKIEFILE, http_request_data_copy(COPY_STRING, Z_STRVAL_P(zoption)));
index 5987681a73d2dcbaa7bfbe39782dfe2d62a7eb7b..444516f53c450becab9bbdd728ca3c15c0b8697e 100644 (file)
 #ifdef HAVE_CONFIG_H
 #      include "config.h"
 #endif
-
-#ifdef HTTP_HAVE_CURL
-#      ifdef PHP_WIN32
-#              include <winsock2.h>
-#      endif
-#      include <curl/curl.h>
-#endif
-
 #include "php.h"
 
+#if defined(ZEND_ENGINE_2) && defined(HTTP_HAVE_CURL)
+
 #include "php_http_std_defs.h"
 #include "php_http_request_object.h"
 #include "php_http_request_api.h"
 #include "php_http_message_api.h"
 #include "php_http_message_object.h"
 
-#ifdef ZEND_ENGINE_2
-#ifdef HTTP_HAVE_CURL
+#ifdef PHP_WIN32
+#      include <winsock2.h>
+#endif
+#include <curl/curl.h>
 
 #define http_request_object_declare_default_properties() _http_request_object_declare_default_properties(TSRMLS_C)
 static inline void _http_request_object_declare_default_properties(TSRMLS_D);
@@ -330,8 +326,7 @@ STATUS _http_request_object_responsehandler(http_request_object *obj, zval *this
        return FAILURE;
 }
 
-#endif /* HTTP_HAVE_CURL */
-#endif /* ZEND_ENGINE_2 */
+#endif /* ZEND_ENGINE_2 && HTTP_HAVE_CURL */
 
 /*
  * Local variables:
index a9cd4ede33fbc357deadbefd837308274ac20dbc..7dc809ba665f60883958d4748d92abf006f857a6 100644 (file)
 #ifdef HAVE_CONFIG_H
 #      include "config.h"
 #endif
-
 #include "php.h"
+
+#if defined(ZEND_ENGINE_2) && defined(HTTP_HAVE_CURL)
+
 #include "php_http.h"
 #include "php_http_std_defs.h"
 #include "php_http_api.h"
@@ -28,8 +30,6 @@
 #include "php_http_request_object.h"
 #include "php_http_requestpool_object.h"
 
-#ifdef ZEND_ENGINE_2
-
 #ifndef HTTP_DEBUG_REQPOOLS
 #      define HTTP_DEBUG_REQPOOLS 0
 #endif
@@ -240,7 +240,7 @@ static int http_request_pool_compare_handles(void *h1, void *h2)
 }
 /* }}} */
 
-#endif /* ZEND_ENGINE_2 */
+#endif /* ZEND_ENGINE_2 && HTTP_HAVE_CURL */
 
 
 /*
index f7161c7b0139e3ce887886a7e60d5fa44ccb24fb..2f1b4175cfaf1d9ed1fc770c42f3053bd25b6948 100644 (file)
 #ifdef HAVE_CONFIG_H
 #      include "config.h"
 #endif
-
-#ifdef HTTP_HAVE_CURL
-#      ifdef PHP_WIN32
-#              include <winsock2.h>
-#      endif
-#      include <curl/curl.h>
-#endif
-
 #include "php.h"
 
+#if defined(ZEND_ENGINE_2) && defined(HTTP_HAVE_CURL)
+
 #include "php_http_std_defs.h"
 #include "php_http_requestpool_object.h"
 #include "php_http_request_pool_api.h"
 
-#ifdef ZEND_ENGINE_2
-#ifdef HTTP_HAVE_CURL
+#ifdef PHP_WIN32
+#      include <winsock2.h>
+#endif
+#include <curl/curl.h>
 
 HTTP_DECLARE_ARG_PASS_INFO();
 
@@ -102,8 +98,7 @@ void _http_requestpool_object_free(zend_object *object TSRMLS_DC)
        efree(o);
 }
 
-#endif /* HTTP_HAVE_CURL */
-#endif /* ZEND_ENGINE_2 */
+#endif /* ZEND_ENGINE_2 && HTTP_HAVE_CURL */
 
 /*
  * Local variables:
index 42416ecf6e91667e026098dc01bcf348fd7106cd..4f42afeb8ab3789c8e0adf4dc034605df69bf3ec 100644 (file)
 #ifdef HAVE_CONFIG_H
 #      include "config.h"
 #endif
-
 #include "php.h"
 
+#ifdef ZEND_ENGINE_2
+
 #include "php_http_std_defs.h"
 #include "php_http_response_object.h"
 
-#ifdef ZEND_ENGINE_2
-
 #include "missing.h"
 
 #define http_response_object_declare_default_properties() _http_response_object_declare_default_properties(TSRMLS_C)
index 4caf6eec838696bfbd046116016f3bad58048c1b..764d2ac85481623309c1ed9ab37b00b5f2b534d4 100644 (file)
 #ifdef HAVE_CONFIG_H
 #      include "config.h"
 #endif
-
 #include "php.h"
+
+#include "SAPI.h"
 #include "php_streams.h"
 #include "ext/standard/php_lcg.h"
-#include "SAPI.h"
 
 #include "php_http.h"
 #include "php_http_std_defs.h"
index 288abe445b1f88067777a33fa3dc90101923f2c1..b32fd9d454758e44191b05bf2114213e51406c7c 100644 (file)
 #ifdef HAVE_CONFIG_H
 #      include "config.h"
 #endif
-
 #include "php.h"
+
+#include "SAPI.h"
 #include "zend_ini.h"
 #include "php_output.h"
 #include "ext/standard/url.h"
 
-#include "SAPI.h"
-
-#include "phpstr/phpstr.h"
-
 #include "php_http.h"
 #include "php_http_api.h"
 #include "php_http_url_api.h"
 #include "php_http_std_defs.h"
 
+#include "phpstr/phpstr.h"
+
 #ifdef PHP_WIN32
 #      include <winsock2.h>
 #elif defined(HAVE_NETDB_H)
index 123c83d59cdd9a82d5fd2bed94f7d0848d7d6200..54baa0b106b8891f7b179016afb2b2007997cb39 100644 (file)
 #ifdef HAVE_CONFIG_H
 #      include "config.h"
 #endif
-
 #include "php.h"
+
+#ifdef ZEND_ENGINE_2
+
 #include "php_http.h"
 #include "php_http_std_defs.h"
 #include "php_http_util_object.h"
 
-#ifdef ZEND_ENGINE_2
-
 HTTP_DECLARE_ARG_PASS_INFO();
 
 zend_class_entry *http_util_object_ce;