Skip to content

Commit 93b51f4

Browse files
committed
Fix [-Wundef] warning in cURL extension
1 parent b35addc commit 93b51f4

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

ext/curl/curl_file.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include "Zend/zend_interfaces.h"
2424
#include "php_curl.h"
2525
#include "curl_file_arginfo.h"
26-
#if HAVE_CURL
26+
#ifdef HAVE_CURL
2727

2828
PHP_CURL_API zend_class_entry *curl_CURLFile_class;
2929

ext/curl/interface.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
#include "php.h"
2424

25-
#if HAVE_CURL
25+
#ifdef HAVE_CURL
2626

2727
#include <stdio.h>
2828
#include <string.h>
@@ -1722,7 +1722,7 @@ static void _php_curl_set_default_options(php_curl *ch)
17221722
curl_easy_setopt(ch->cp, CURLOPT_INFILE, (void *) ch);
17231723
curl_easy_setopt(ch->cp, CURLOPT_HEADERFUNCTION, curl_write_header);
17241724
curl_easy_setopt(ch->cp, CURLOPT_WRITEHEADER, (void *) ch);
1725-
#if !defined(ZTS)
1725+
#ifndef ZTS
17261726
curl_easy_setopt(ch->cp, CURLOPT_DNS_USE_GLOBAL_CACHE, 1);
17271727
#endif
17281728
curl_easy_setopt(ch->cp, CURLOPT_DNS_CACHE_TIMEOUT, 120);
@@ -1736,7 +1736,7 @@ static void _php_curl_set_default_options(php_curl *ch)
17361736
curl_easy_setopt(ch->cp, CURLOPT_CAINFO, cainfo);
17371737
}
17381738

1739-
#if defined(ZTS)
1739+
#ifdef ZTS
17401740
curl_easy_setopt(ch->cp, CURLOPT_NOSIGNAL, 1);
17411741
#endif
17421742
}

ext/curl/multi.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
#include "php.h"
2424

25-
#if HAVE_CURL
25+
#ifdef HAVE_CURL
2626

2727
#include "php_curl.h"
2828

ext/curl/php_curl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#define HAVE_CURL 1
2727
#endif
2828

29-
#if HAVE_CURL
29+
#ifdef HAVE_CURL
3030

3131
#define PHP_CURL_DEBUG 0
3232

ext/curl/share.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
#include "php.h"
2424

25-
#if HAVE_CURL
25+
#ifdef HAVE_CURL
2626

2727
#include "php_curl.h"
2828

0 commit comments

Comments
 (0)