mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
Fix [-Wstrict-prototypes] warning in PCNTL extension
To achieve this we need to introduce a new wrapper function with dummy arguments which calls pcntl_signal_dispatch() to respect the function pointer signature for a tick function.
This commit is contained in:
parent
b7356692f6
commit
2068d230d9
@ -89,7 +89,8 @@ static void pcntl_siginfo_to_zval(int, siginfo_t*, zval*);
|
||||
#else
|
||||
static void pcntl_signal_handler(int);
|
||||
#endif
|
||||
static void pcntl_signal_dispatch();
|
||||
static void pcntl_signal_dispatch(void);
|
||||
static void pcntl_signal_dispatch_tick_function(int dummy_int, void *dummy_pointer);
|
||||
static void pcntl_interrupt_function(zend_execute_data *execute_data);
|
||||
|
||||
void php_register_signal_constants(INIT_FUNC_ARGS)
|
||||
@ -424,7 +425,7 @@ static PHP_GINIT_FUNCTION(pcntl)
|
||||
|
||||
PHP_RINIT_FUNCTION(pcntl)
|
||||
{
|
||||
php_add_tick_function(pcntl_signal_dispatch, NULL);
|
||||
php_add_tick_function(pcntl_signal_dispatch_tick_function, NULL);
|
||||
zend_hash_init(&PCNTL_G(php_signal_table), 16, NULL, ZVAL_PTR_DTOR, 0);
|
||||
PCNTL_G(head) = PCNTL_G(tail) = PCNTL_G(spares) = NULL;
|
||||
PCNTL_G(async_signals) = 0;
|
||||
@ -1385,6 +1386,11 @@ void pcntl_signal_dispatch()
|
||||
sigprocmask(SIG_SETMASK, &old_mask, NULL);
|
||||
}
|
||||
|
||||
static void pcntl_signal_dispatch_tick_function(int dummy_int, void *dummy_pointer)
|
||||
{
|
||||
return pcntl_signal_dispatch();
|
||||
}
|
||||
|
||||
/* {{{ Enable/disable asynchronous signal handling and return the old setting. */
|
||||
PHP_FUNCTION(pcntl_async_signals)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user