summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Peter Banyard <girgias@php.net>2020-05-12 22:36:08 +0200
committerGeorge Peter Banyard <girgias@php.net>2020-05-16 15:31:13 +0200
commit93b51f4e26c5615b1218f8bc3c5d6a5ef2a94b18 (patch)
tree8bb9ea72c2e1326dfe062da1fe527b621b0b83a1
parentb35addc585edf964a1f83e956adff5d32b1242e7 (diff)
downloadphp-git-93b51f4e26c5615b1218f8bc3c5d6a5ef2a94b18.tar.gz
Fix [-Wundef] warning in cURL extension
-rw-r--r--ext/curl/curl_file.c2
-rw-r--r--ext/curl/interface.c6
-rw-r--r--ext/curl/multi.c2
-rw-r--r--ext/curl/php_curl.h2
-rw-r--r--ext/curl/share.c2
5 files changed, 7 insertions, 7 deletions
diff --git a/ext/curl/curl_file.c b/ext/curl/curl_file.c
index 3f4fe03fa4..bcfc518051 100644
--- a/ext/curl/curl_file.c
+++ b/ext/curl/curl_file.c
@@ -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;
diff --git a/ext/curl/interface.c b/ext/curl/interface.c
index 12762cd7f4..dc79a9e2d7 100644
--- a/ext/curl/interface.c
+++ b/ext/curl/interface.c
@@ -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
}
diff --git a/ext/curl/multi.c b/ext/curl/multi.c
index 51399fe01f..d8c1caac3c 100644
--- a/ext/curl/multi.c
+++ b/ext/curl/multi.c
@@ -22,7 +22,7 @@
#include "php.h"
-#if HAVE_CURL
+#ifdef HAVE_CURL
#include "php_curl.h"
diff --git a/ext/curl/php_curl.h b/ext/curl/php_curl.h
index e7e9361e0e..2013e1cef2 100644
--- a/ext/curl/php_curl.h
+++ b/ext/curl/php_curl.h
@@ -26,7 +26,7 @@
#define HAVE_CURL 1
#endif
-#if HAVE_CURL
+#ifdef HAVE_CURL
#define PHP_CURL_DEBUG 0
diff --git a/ext/curl/share.c b/ext/curl/share.c
index 0b119c59a2..78532f4d37 100644
--- a/ext/curl/share.c
+++ b/ext/curl/share.c
@@ -22,7 +22,7 @@
#include "php.h"
-#if HAVE_CURL
+#ifdef HAVE_CURL
#include "php_curl.h"