diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2018-02-28 02:36:18 +0100 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2018-02-28 02:36:18 +0100 |
commit | dfa383497ac627662861b0aba415746a263d82d7 (patch) | |
tree | 2393b39e5296b834b6b18ecca5dd16d27af084ed /ext/pcntl | |
parent | c1882ef0045d0a20e4e15024446b8acad5ca1991 (diff) | |
parent | 15d611e451140a4c48998333e9848538ca7136a7 (diff) | |
download | php-git-dfa383497ac627662861b0aba415746a263d82d7.tar.gz |
Merge remote-tracking branch 'origin/PHP-7.2'
Diffstat (limited to 'ext/pcntl')
-rw-r--r-- | ext/pcntl/pcntl.c | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c index 75f2ab19e9..82a4a454e2 100644 --- a/ext/pcntl/pcntl.c +++ b/ext/pcntl/pcntl.c @@ -770,12 +770,14 @@ PHP_FUNCTION(pcntl_wifexited) { #ifdef WIFEXITED zend_long status_word; + int int_status_word; if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &status_word) == FAILURE) { return; } - if (WIFEXITED((int)status_word)) + int_status_word = (int) status_word; + if (WIFEXITED(int_status_word)) RETURN_TRUE; #endif @@ -789,12 +791,14 @@ PHP_FUNCTION(pcntl_wifstopped) { #ifdef WIFSTOPPED zend_long status_word; + int int_status_word; if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &status_word) == FAILURE) { return; } - if (WIFSTOPPED((int)status_word)) + int_status_word = (int) status_word; + if (WIFSTOPPED(int_status_word)) RETURN_TRUE; #endif RETURN_FALSE; @@ -807,12 +811,14 @@ PHP_FUNCTION(pcntl_wifsignaled) { #ifdef WIFSIGNALED zend_long status_word; + int int_status_word; if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &status_word) == FAILURE) { return; } - if (WIFSIGNALED((int)status_word)) + int_status_word = (int) status_word; + if (WIFSIGNALED(int_status_word)) RETURN_TRUE; #endif RETURN_FALSE; @@ -824,12 +830,14 @@ PHP_FUNCTION(pcntl_wifcontinued) { #ifdef HAVE_WCONTINUED zend_long status_word; + int int_status_word; if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &status_word) == FAILURE) { return; } - if (WIFCONTINUED((int)status_word)) + int_status_word = (int) status_word; + if (WIFCONTINUED(int_status_word)) RETURN_TRUE; #endif RETURN_FALSE; @@ -843,12 +851,14 @@ PHP_FUNCTION(pcntl_wexitstatus) { #ifdef WEXITSTATUS zend_long status_word; + int int_status_word; if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &status_word) == FAILURE) { return; } - RETURN_LONG(WEXITSTATUS((int)status_word)); + int_status_word = (int) status_word; + RETURN_LONG(WEXITSTATUS(int_status_word)); #else RETURN_FALSE; #endif @@ -861,12 +871,14 @@ PHP_FUNCTION(pcntl_wtermsig) { #ifdef WTERMSIG zend_long status_word; + int int_status_word; if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &status_word) == FAILURE) { return; } - RETURN_LONG(WTERMSIG((int)status_word)); + int_status_word = (int) status_word; + RETURN_LONG(WTERMSIG(int_status_word)); #else RETURN_FALSE; #endif @@ -879,12 +891,14 @@ PHP_FUNCTION(pcntl_wstopsig) { #ifdef WSTOPSIG zend_long status_word; + int int_status_word; if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &status_word) == FAILURE) { return; } - RETURN_LONG(WSTOPSIG((int)status_word)); + int_status_word = (int) status_word; + RETURN_LONG(WSTOPSIG(int_status_word)); #else RETURN_FALSE; #endif |