]> granicus.if.org Git - php/commitdiff
Fix [-Wundef] warning in cURL extension
authorGeorge Peter Banyard <girgias@php.net>
Tue, 12 May 2020 20:36:08 +0000 (22:36 +0200)
committerGeorge Peter Banyard <girgias@php.net>
Sat, 16 May 2020 13:31:13 +0000 (15:31 +0200)
ext/curl/curl_file.c
ext/curl/interface.c
ext/curl/multi.c
ext/curl/php_curl.h
ext/curl/share.c

index 3f4fe03fa42adbb4e2d529c3faeb86d168bc47a8..bcfc51805172858245838f8d704583800d76dbb0 100644 (file)
@@ -23,7 +23,7 @@
 #include "Zend/zend_interfaces.h"
 #include "php_curl.h"
 #include "curl_file_arginfo.h"
-#if HAVE_CURL
+#ifdef HAVE_CURL
 
 PHP_CURL_API zend_class_entry *curl_CURLFile_class;
 
index 12762cd7f44d44c85381d4cfc9b9fc752cfe2fde..dc79a9e2d7c63bde6e542c5498be89dc9e73c3d4 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "php.h"
 
-#if HAVE_CURL
+#ifdef HAVE_CURL
 
 #include <stdio.h>
 #include <string.h>
@@ -1722,7 +1722,7 @@ static void _php_curl_set_default_options(php_curl *ch)
        curl_easy_setopt(ch->cp, CURLOPT_INFILE,            (void *) ch);
        curl_easy_setopt(ch->cp, CURLOPT_HEADERFUNCTION,    curl_write_header);
        curl_easy_setopt(ch->cp, CURLOPT_WRITEHEADER,       (void *) ch);
-#if !defined(ZTS)
+#ifndef ZTS
        curl_easy_setopt(ch->cp, CURLOPT_DNS_USE_GLOBAL_CACHE, 1);
 #endif
        curl_easy_setopt(ch->cp, CURLOPT_DNS_CACHE_TIMEOUT, 120);
@@ -1736,7 +1736,7 @@ static void _php_curl_set_default_options(php_curl *ch)
                curl_easy_setopt(ch->cp, CURLOPT_CAINFO, cainfo);
        }
 
-#if defined(ZTS)
+#ifdef ZTS
        curl_easy_setopt(ch->cp, CURLOPT_NOSIGNAL, 1);
 #endif
 }
index 51399fe01f74e27de9b9bd9f2a057c53e71e4dc4..d8c1caac3c642d07c7336ff1e6687914ddab12df 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "php.h"
 
-#if HAVE_CURL
+#ifdef HAVE_CURL
 
 #include "php_curl.h"
 
index e7e9361e0e02227ce7e939deab811202a08af8b3..2013e1cef2f9da2805cc7e1ada0f982c3ebbe7ec 100644 (file)
@@ -26,7 +26,7 @@
 #define HAVE_CURL 1
 #endif
 
-#if HAVE_CURL
+#ifdef HAVE_CURL
 
 #define PHP_CURL_DEBUG 0
 
index 0b119c59a299ed38eb51bc8ef50adaca0925e9cf..78532f4d37f2901e0c77c494f0daa4c573f76146 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "php.h"
 
-#if HAVE_CURL
+#ifdef HAVE_CURL
 
 #include "php_curl.h"