updated changelog and reworded package description
[m6w6/ext-http] / http_requestpool_object.c
index 0bb585974c64e8ba0e5f462659f49e2fa9859bb5..3a0c0200af8cd46e5da65384739f35600ef52a32 100644 (file)
 
 /* $Id$ */
 
-
 #ifdef HAVE_CONFIG_H
 #      include "config.h"
 #endif
-#include "php.h"
+
+#define HTTP_WANT_CURL
+#include "php_http.h"
 
 #if defined(ZEND_ENGINE_2) && defined(HTTP_HAVE_CURL)
 
-#include "php_http_std_defs.h"
+#include "zend_interfaces.h"
+
 #include "php_http_api.h"
-#include "php_http_requestpool_object.h"
-#include "php_http_request_pool_api.h"
-#include "php_http_request_object.h"
 #include "php_http_exception_object.h"
+#include "php_http_request_api.h"
+#include "php_http_request_object.h"
+#include "php_http_request_pool_api.h"
+#include "php_http_requestpool_object.h"
 
-#include "zend_interfaces.h"
-#ifdef HAVE_SPL
-#      include "ext/spl/spl_array.h"
-#      include "ext/spl/spl_iterators.h"
-#endif
-
-#ifdef PHP_WIN32
-#      include <winsock2.h>
+#if defined(HAVE_SPL) && !defined(WONKY)
+/* SPL doesn't install its headers */
+extern PHPAPI zend_class_entry *spl_ce_Countable;
 #endif
-#include <curl/curl.h>
 
 #define HTTP_BEGIN_ARGS(method, req_args)      HTTP_BEGIN_ARGS_EX(HttpRequestPool, method, 0, req_args)
 #define HTTP_EMPTY_ARGS(method, ret_ref)       HTTP_EMPTY_ARGS_EX(HttpRequestPool, method, ret_ref)
@@ -109,8 +106,8 @@ static zend_object_handlers http_requestpool_object_handlers;
 PHP_MINIT_FUNCTION(http_requestpool_object)
 {
        HTTP_REGISTER_CLASS_EX(HttpRequestPool, http_requestpool_object, NULL, 0);
-#ifdef HAVE_SPL
-       zend_class_implements(http_requestpool_object_ce TSRMLS_CC, 2, spl_ce_Countable, spl_ce_Iterator);
+#if defined(HAVE_SPL) && !defined(WONKY)
+       zend_class_implements(http_requestpool_object_ce TSRMLS_CC, 2, spl_ce_Countable, zend_ce_iterator);
 #else
        zend_class_implements(http_requestpool_object_ce TSRMLS_CC, 1, zend_ce_iterator);
 #endif