- 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 3e7baeb..3b05887 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 d943b0d..1773ce7 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 645d335..5e5bafc 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 a70feb0..4e1473a 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 fc67a89..c59b2cf 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 7ea4af5..af84046 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 4e67be7..7612013 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 8c124cb..f264b68 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 47cd1dd..1cf8661 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 c26a2f1..c619991 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 c18e5ae..08959ed 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 24b1acc..3f77eff 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 5987681..444516f 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 a9cd4ed..7dc809b 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 f7161c7..2f1b417 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 42416ec..4f42afe 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 4caf6ee..764d2ac 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 288abe4..b32fd9d 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 123c83d..54baa0b 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;