X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http.c;h=1516aa7ce753f600fb1249cdea70a71b639338c2;hp=0acb05c33c85462ddcbc9e1b9214626082f185d4;hb=7750286b889f7d265a5363546b9bfc5b58246277;hpb=b08947e98f1832091c8a9f6dea3799e0524d2822 diff --git a/http.c b/http.c index 0acb05c..1516aa7 100644 --- a/http.c +++ b/http.c @@ -29,7 +29,9 @@ #include "php_http_std_defs.h" #include "php_http_api.h" #include "php_http_send_api.h" -#include "php_http_request_api.h" +#ifdef HTTP_HAVE_CURL +# include "php_http_request_api.h" +#endif #ifdef ZEND_ENGINE_2 # include "php_http_util_object.h" @@ -200,7 +202,7 @@ PHP_MINIT_FUNCTION(http) REGISTER_INI_ENTRIES(); #ifdef HTTP_HAVE_CURL - if (SUCCESS != http_request_global_init()) { + if (CURLE_OK != curl_global_init(CURL_GLOBAL_ALL)) { return FAILURE; } #endif /* HTTP_HAVE_CURL */ @@ -286,6 +288,7 @@ PHP_MINFO_FUNCTION(http) } php_info_print_table_end(); +#ifdef HTTP_HAVE_CURL php_info_print_table_start(); { unsigned i; @@ -314,6 +317,7 @@ PHP_MINFO_FUNCTION(http) phpstr_free(custom_request_methods); } php_info_print_table_end(); +#endif php_info_print_table_start(); {