/* $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)
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