summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorGeorge Peter Banyard <girgias@php.net>2020-05-20 13:59:44 +0200
committerGeorge Peter Banyard <girgias@php.net>2020-05-20 14:01:10 +0200
commit24de4274f31ede6b4f25b8c0e956bbca6464279e (patch)
treea9f24390e7eab0c53131ae60f718d4afc119a4d7 /ext
parentd50b076fa30f5b88e05aa29cfbb70da9b0c312e4 (diff)
downloadphp-git-24de4274f31ede6b4f25b8c0e956bbca6464279e.tar.gz
Fix [-Wundef] warning in PCNTL extension
Diffstat (limited to 'ext')
-rw-r--r--ext/pcntl/pcntl.c10
-rw-r--r--ext/pcntl/pcntl.stub.php2
-rw-r--r--ext/pcntl/pcntl_arginfo.h12
-rw-r--r--ext/pcntl/php_pcntl.h2
4 files changed, 13 insertions, 13 deletions
diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c
index a52429e549..6f9fd8a182 100644
--- a/ext/pcntl/pcntl.c
+++ b/ext/pcntl/pcntl.c
@@ -35,7 +35,7 @@
#include "php_signal.h"
#include "php_ticks.h"
-#if HAVE_GETPRIORITY || HAVE_SETPRIORITY || HAVE_WAIT3
+#if defined(HAVE_GETPRIORITY) || defined(HAVE_SETPRIORITY) || defined(HAVE_WAIT3)
#include <sys/wait.h>
#include <sys/time.h>
#include <sys/resource.h>
@@ -166,7 +166,7 @@ void php_register_signal_constants(INIT_FUNC_ARGS)
REGISTER_LONG_CONSTANT("SIGRTMAX", (zend_long) SIGRTMAX, CONST_CS | CONST_PERSISTENT);
#endif
-#if HAVE_GETPRIORITY || HAVE_SETPRIORITY
+#if defined(HAVE_GETPRIORITY) || defined(HAVE_SETPRIORITY)
REGISTER_LONG_CONSTANT("PRIO_PGRP", PRIO_PGRP, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PRIO_USER", PRIO_USER, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PRIO_PROCESS", PRIO_PROCESS, CONST_CS | CONST_PERSISTENT);
@@ -181,7 +181,7 @@ void php_register_signal_constants(INIT_FUNC_ARGS)
/* }}} */
/* {{{ si_code */
-#if HAVE_SIGWAITINFO && HAVE_SIGTIMEDWAIT
+#if defined(HAVE_SIGWAITINFO) && defined(HAVE_SIGTIMEDWAIT)
REGISTER_LONG_CONSTANT("SI_USER", SI_USER, CONST_CS | CONST_PERSISTENT);
#ifdef SI_NOINFO
REGISTER_LONG_CONSTANT("SI_NOINFO", SI_NOINFO, CONST_CS | CONST_PERSISTENT);
@@ -314,7 +314,7 @@ void php_register_signal_constants(INIT_FUNC_ARGS)
#ifdef BUS_OBJERR
REGISTER_LONG_CONSTANT("BUS_OBJERR", BUS_OBJERR, CONST_CS | CONST_PERSISTENT);
#endif
-#endif /* HAVE_SIGWAITINFO && HAVE_SIGTIMEDWAIT */
+#endif /* defined(HAVE_SIGWAITINFO) && defined(HAVE_SIGTIMEDWAIT) */
/* }}} */
/* unshare(/clone) constants */
@@ -1058,7 +1058,7 @@ PHP_FUNCTION(pcntl_sigprocmask)
#endif
#ifdef HAVE_STRUCT_SIGINFO_T
-# if HAVE_SIGWAITINFO && HAVE_SIGTIMEDWAIT
+# if defined(HAVE_SIGWAITINFO) && defined(HAVE_SIGTIMEDWAIT)
static void pcntl_sigwaitinfo(INTERNAL_FUNCTION_PARAMETERS, int timedwait) /* {{{ */
{
zval *user_set, *user_signo, *user_siginfo = NULL;
diff --git a/ext/pcntl/pcntl.stub.php b/ext/pcntl/pcntl.stub.php
index 60e9c98a7f..5653244119 100644
--- a/ext/pcntl/pcntl.stub.php
+++ b/ext/pcntl/pcntl.stub.php
@@ -23,7 +23,7 @@ function pcntl_sigprocmask(int $how, array $set, &$oldset = null): bool {}
#endif
#ifdef HAVE_STRUCT_SIGINFO_T
-#if HAVE_SIGWAITINFO && HAVE_SIGTIMEDWAIT
+#if defined(HAVE_SIGWAITINFO) && defined(HAVE_SIGTIMEDWAIT)
function pcntl_sigwaitinfo(array $set, &$info = []): int|false {}
function pcntl_sigtimedwait(array $set, &$info = [], int $seconds = 0, int $nanoseconds = 0): int|false {}
diff --git a/ext/pcntl/pcntl_arginfo.h b/ext/pcntl/pcntl_arginfo.h
index e7dff8e379..3310785cc3 100644
--- a/ext/pcntl/pcntl_arginfo.h
+++ b/ext/pcntl/pcntl_arginfo.h
@@ -37,14 +37,14 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pcntl_sigprocmask, 0, 2, _IS_BOO
ZEND_END_ARG_INFO()
#endif
-#if defined(HAVE_STRUCT_SIGINFO_T) && HAVE_SIGWAITINFO && HAVE_SIGTIMEDWAIT
+#if defined(HAVE_STRUCT_SIGINFO_T) && defined(HAVE_SIGWAITINFO) && defined(HAVE_SIGTIMEDWAIT)
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pcntl_sigwaitinfo, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, set, IS_ARRAY, 0)
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, info, "[]")
ZEND_END_ARG_INFO()
#endif
-#if defined(HAVE_STRUCT_SIGINFO_T) && HAVE_SIGWAITINFO && HAVE_SIGTIMEDWAIT
+#if defined(HAVE_STRUCT_SIGINFO_T) && defined(HAVE_SIGWAITINFO) && defined(HAVE_SIGTIMEDWAIT)
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pcntl_sigtimedwait, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(0, set, IS_ARRAY, 0)
ZEND_ARG_INFO_WITH_DEFAULT_VALUE(1, info, "[]")
@@ -128,10 +128,10 @@ ZEND_FUNCTION(pcntl_signal_dispatch);
#if defined(HAVE_SIGPROCMASK)
ZEND_FUNCTION(pcntl_sigprocmask);
#endif
-#if defined(HAVE_STRUCT_SIGINFO_T) && HAVE_SIGWAITINFO && HAVE_SIGTIMEDWAIT
+#if defined(HAVE_STRUCT_SIGINFO_T) && defined(HAVE_SIGWAITINFO) && defined(HAVE_SIGTIMEDWAIT)
ZEND_FUNCTION(pcntl_sigwaitinfo);
#endif
-#if defined(HAVE_STRUCT_SIGINFO_T) && HAVE_SIGWAITINFO && HAVE_SIGTIMEDWAIT
+#if defined(HAVE_STRUCT_SIGINFO_T) && defined(HAVE_SIGWAITINFO) && defined(HAVE_SIGTIMEDWAIT)
ZEND_FUNCTION(pcntl_sigtimedwait);
#endif
ZEND_FUNCTION(pcntl_wifexited);
@@ -169,10 +169,10 @@ static const zend_function_entry ext_functions[] = {
#if defined(HAVE_SIGPROCMASK)
ZEND_FE(pcntl_sigprocmask, arginfo_pcntl_sigprocmask)
#endif
-#if defined(HAVE_STRUCT_SIGINFO_T) && HAVE_SIGWAITINFO && HAVE_SIGTIMEDWAIT
+#if defined(HAVE_STRUCT_SIGINFO_T) && defined(HAVE_SIGWAITINFO) && defined(HAVE_SIGTIMEDWAIT)
ZEND_FE(pcntl_sigwaitinfo, arginfo_pcntl_sigwaitinfo)
#endif
-#if defined(HAVE_STRUCT_SIGINFO_T) && HAVE_SIGWAITINFO && HAVE_SIGTIMEDWAIT
+#if defined(HAVE_STRUCT_SIGINFO_T) && defined(HAVE_SIGWAITINFO) && defined(HAVE_SIGTIMEDWAIT)
ZEND_FE(pcntl_sigtimedwait, arginfo_pcntl_sigtimedwait)
#endif
ZEND_FE(pcntl_wifexited, arginfo_pcntl_wifexited)
diff --git a/ext/pcntl/php_pcntl.h b/ext/pcntl/php_pcntl.h
index bbb07bc896..4fec1627ad 100644
--- a/ext/pcntl/php_pcntl.h
+++ b/ext/pcntl/php_pcntl.h
@@ -55,7 +55,7 @@ PHP_FUNCTION(pcntl_strerror);
PHP_FUNCTION(pcntl_sigprocmask);
#endif
#ifdef HAVE_STRUCT_SIGINFO_T
-# if HAVE_SIGWAITINFO && HAVE_SIGTIMEDWAIT
+# if defined(HAVE_SIGWAITINFO) && defined(HAVE_SIGTIMEDWAIT)
PHP_FUNCTION(pcntl_sigwaitinfo);
PHP_FUNCTION(pcntl_sigtimedwait);
# endif