* attempt yet again to fix php4 snaps build
[m6w6/ext-http] / http.c
diff --git a/http.c b/http.c
index e81deffd554b40bfeeb90e4650df77c283997858..56ae91d1024f3a3c3aa5292df29393aa85b32bd3 100644 (file)
--- a/http.c
+++ b/http.c
 
 /* $Id$ */
 
+#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
+#if defined(HAVE_CURL) && HAVE_CURL
+#      ifdef PHP_WIN32
+#      include <winsock2.h>
+#      include <sys/types.h>
+#      endif
+#include <curl/curl.h>
+#endif
+
 #include "php.h"
 #include "snprintf.h"
 #include "ext/standard/info.h"
 #include "php_http.h"
 #include "php_http_api.h"
 
-#if defined(HAVE_CURL) && HAVE_CURL
-#include <curl/curl.h>
-#endif
-
 ZEND_DECLARE_MODULE_GLOBALS(http)
 
 #ifdef COMPILE_DL_HTTP
@@ -481,7 +487,7 @@ PHP_FUNCTION(http_redirect)
                sprintf(RED, "Redirecting to <a href=\"%s\">%s</a>.\n", URI, URI);
        }
        efree(URI);
-       
+
        if ((SUCCESS == http_send_header(LOC)) && (SUCCESS == http_send_status((permanent ? 301 : 302)))) {
                php_body_write(RED, strlen(RED) TSRMLS_CC);
                RETURN_TRUE;