/* $Id$ */
-#define _WINSOCKAPI_
-#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
+#ifdef HTTP_HAVE_CURL
+# ifdef PHP_WIN32
+# define _WINSOCKAPI_
+# include <winsock2.h>
+# include <sys/types.h>
+# endif
+# include <curl/curl.h>
+#endif
+
#include "php.h"
#include "php_ini.h"
#include "snprintf.h"
#endif
#ifdef HTTP_HAVE_CURL
-
-# ifdef PHP_WIN32
-# include <winsock2.h>
-# include <sys/types.h>
-# endif
-
-# include <curl/curl.h>
-
/* {{{ ARG_INFO */
# ifdef ZEND_BEGIN_ARG_INFO
ZEND_BEGIN_ARG_INFO(http_request_info_ref_3, 0)
/* $Id$ */
-#define _WINSOCKAPI_
-#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
-
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not parse HTTP response");
RETURN_FALSE;
}
-
+
array_init(return_value);
add_index_zval(return_value, 0, zheaders);
add_index_zval(return_value, 1, zbody);
HTTP_POST,
} http_request_method;
-#endif
+#endif /* HTTP_HAVE _CURL */
PHP_METHOD(HTTPi, date);
PHP_METHOD(HTTPi, absoluteURI);
PHP_METHOD(HTTPi, head);
PHP_METHOD(HTTPi, postData);
PHP_METHOD(HTTPi, postArray);
-#endif
+#endif /* HTTP_HAVE_CURL */
PHP_METHOD(HTTPi, authBasic);
PHP_METHOD(HTTPi, authBasicCallback);
PHP_FUNCTION(http_head);
PHP_FUNCTION(http_post_data);
PHP_FUNCTION(http_post_array);
-#endif
+#endif /* HTTP_HAVE_CURL */
PHP_FUNCTION(http_auth_basic);
PHP_FUNCTION(http_auth_basic_cb);
#ifndef ZEND_ENGINE_2
PHP_FUNCTION(http_build_query);
-#endif
+#endif /* ZEND_ENGINE_2 */
PHP_FUNCTION(ob_httpetaghandler);
PHP_MINIT_FUNCTION(http);
size_t size;
} curlbuf;
zend_llist to_free;
-#endif
+#endif /* HTTP_HAVE_CURL */
ZEND_END_MODULE_GLOBALS(http)
#endif /* PHP_HTTP_H */