From: Michael Wallner Date: Mon, 28 Sep 2015 16:04:18 +0000 (+0200) Subject: fix build X-Git-Tag: RELEASE_3_0_0_RC1~16 X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=commitdiff_plain;h=0f94bfd75aa4f2fff4c312299d5914781d3c328d fix build --- diff --git a/src/php_http_api.h b/src/php_http_api.h index 2313413..e8c175f 100644 --- a/src/php_http_api.h +++ b/src/php_http_api.h @@ -23,8 +23,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/src/php_http_client_curl.c b/src/php_http_client_curl.c index 85f12b7..e79ef15 100644 --- a/src/php_http_client_curl.c +++ b/src/php_http_client_curl.c @@ -1230,7 +1230,7 @@ static void php_http_curle_options_init(php_http_options_t *registry) /* url options */ #if PHP_HTTP_CURL_VERSION(7,42,0) - php_http_option_register(registry, ZEND_STRL("path_as_is"), CURLOPT_PATH_AS_IS, IS_BOOL); + php_http_option_register(registry, ZEND_STRL("path_as_is"), CURLOPT_PATH_AS_IS, _IS_BOOL); #endif /* proxy */ diff --git a/src/php_http_negotiate.c b/src/php_http_negotiate.c index d2410f8..9fdad26 100644 --- a/src/php_http_negotiate.c +++ b/src/php_http_negotiate.c @@ -14,13 +14,10 @@ static int php_http_negotiate_sort(const void *first, const void *second) { - zval result; Bucket *b1 = (Bucket *) first, *b2 = (Bucket *) second; + int result = numeric_compare_function(&b1->val, &b2->val); - if (numeric_compare_function(&result, &b1->val, &b2->val)!= SUCCESS) { - return 0; - } - return (Z_LVAL(result) > 0 ? -1 : (Z_LVAL(result) < 0 ? 1 : 0)); + return (result > 0 ? -1 : (result < 0 ? 1 : 0)); } #define M_PRI 5 @@ -156,7 +153,7 @@ HashTable *php_http_negotiate(const char *value_str, size_t value_len, HashTable zval_dtor(&arr); zend_hash_sort(result, php_http_negotiate_sort, 0); } - + return result; }