summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS4
-rw-r--r--ext/pcntl/pcntl.c15
2 files changed, 12 insertions, 7 deletions
diff --git a/NEWS b/NEWS
index 1176ba12d3..3e552aea05 100644
--- a/NEWS
+++ b/NEWS
@@ -39,6 +39,10 @@ PHP NEWS
- OpenSSL:
. Fixed openssl_* arginfos. (carusogabriel)
+- PCNTL:
+ . Fixed bug #75873 (pcntl_wexitstatus returns incorrect on Big_Endian platform
+ (s390x)). (Sam Ding)
+
- PGSQL:
. Fixed bug #75838 (Memory leak in pg_escape_bytea()). (ard_1 at mail dot ru)
diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c
index 08e4cd5f70..abdee8b0bd 100644
--- a/ext/pcntl/pcntl.c
+++ b/ext/pcntl/pcntl.c
@@ -775,9 +775,10 @@ PHP_FUNCTION(pcntl_wifexited)
return;
}
- if (WIFEXITED(status_word))
+ if (WIFEXITED((int)status_word))
RETURN_TRUE;
#endif
+
RETURN_FALSE;
}
/* }}} */
@@ -793,7 +794,7 @@ PHP_FUNCTION(pcntl_wifstopped)
return;
}
- if (WIFSTOPPED(status_word))
+ if (WIFSTOPPED((int)status_word))
RETURN_TRUE;
#endif
RETURN_FALSE;
@@ -811,7 +812,7 @@ PHP_FUNCTION(pcntl_wifsignaled)
return;
}
- if (WIFSIGNALED(status_word))
+ if (WIFSIGNALED((int)status_word))
RETURN_TRUE;
#endif
RETURN_FALSE;
@@ -828,7 +829,7 @@ PHP_FUNCTION(pcntl_wifcontinued)
return;
}
- if (WIFCONTINUED(status_word))
+ if (WIFCONTINUED((int)status_word))
RETURN_TRUE;
#endif
RETURN_FALSE;
@@ -847,7 +848,7 @@ PHP_FUNCTION(pcntl_wexitstatus)
return;
}
- RETURN_LONG(WEXITSTATUS(status_word));
+ RETURN_LONG(WEXITSTATUS((int)status_word));
#else
RETURN_FALSE;
#endif
@@ -865,7 +866,7 @@ PHP_FUNCTION(pcntl_wtermsig)
return;
}
- RETURN_LONG(WTERMSIG(status_word));
+ RETURN_LONG(WTERMSIG((int)status_word));
#else
RETURN_FALSE;
#endif
@@ -883,7 +884,7 @@ PHP_FUNCTION(pcntl_wstopsig)
return;
}
- RETURN_LONG(WSTOPSIG(status_word));
+ RETURN_LONG(WSTOPSIG((int)status_word));
#else
RETURN_FALSE;
#endif