mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
Fix [-Wundef] warning in PCNTL extension
This commit is contained in:
parent
d50b076fa3
commit
24de4274f3
@ -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;
|
||||
|
@ -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 {}
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user