* attempt to make http_build_query available for PHP4
authorMichael Wallner <mike@php.net>
Wed, 9 Feb 2005 19:03:20 +0000 (19:03 +0000)
committerMichael Wallner <mike@php.net>
Wed, 9 Feb 2005 19:03:20 +0000 (19:03 +0000)
http.c
http_api.c
php_http.h
php_http_api.h

diff --git a/http.c b/http.c
index 74e2968ec7839e831796611a4a0f807a6e21e0ba..e432ef02abc5730e3df1648c7f9ec8f93b3c185d 100644 (file)
--- a/http.c
+++ b/http.c
 #include "php_http.h"
 #include "php_http_api.h"
 
+#ifdef ZEND_ENGINE_2
+#include "ext/standard/php_http.h"
+#endif
+
 #ifdef HTTP_HAVE_CURL
 
 #ifdef PHP_WIN32
@@ -75,6 +79,9 @@ function_entry http_functions[] = {
 #endif
        PHP_FE(http_auth_basic, NULL)
        PHP_FE(http_auth_basic_cb, NULL)
+#ifndef ZEND_ENGINE_2
+       PHP_FE(http_build_query, NULL)
+#endif
        {NULL, NULL, NULL}
 };
 /* }}} */
index a321350deeddda7fc7b6db1c735547eacf819308..613d2597446b2cd2c02a121090990d1c4634d437 100644 (file)
 
 #include "SAPI.h"
 
-#if (PHP_MAJOR_VERSION >= 5)
+#ifdef ZEND_ENGINE_2
 #include "ext/standard/php_http.h"
 #else
-#include "php_http_build_query.h"
-#include "http_build_query.c"
+#include "php_http_build_query.c"
 #endif
 
 #include "php_http.h"
index 4ed736c0526ce341b457714d57225cd32b04a8a0..cf955a84040c933ec8f0bb673dec90c77eab2a9a 100644 (file)
@@ -34,6 +34,10 @@ extern zend_module_entry http_module_entry;
 #define HTTP_G(v) (http_globals.v)
 #endif
 
+#ifndef ZEND_ENGINE_2
+#include "php_http_build_query.h"
+#endif
+
 PHP_FUNCTION(http_date);
 PHP_FUNCTION(http_absolute_uri);
 PHP_FUNCTION(http_negotiate_language);
index 56cf5416a0ac9c80a208e6d2f7096439d4c8066b..61ae827784c3101d1341983f7f093bf82b178773 100644 (file)
 #define PHP_HTTP_API
 #endif
 
+#ifndef ZEND_ENGINE_2
+#include "php_http_build_query.h"
+#endif
+
 /* make functions that return SUCCESS|FAILURE more obvious */
 typedef int STATUS;