Skip to content

Commit cfb7395

Browse files
authored
Check ext/pcntl required functions with for loop (#14302)
This omits defining redundant HAVE_<function> symbols since these are used unconditionally in ext/pcntl. * HAVE_FORK is defined via ext/standard/config.m4 * HAVE_SIGACTION is defined via Zend.m4 * HAVE_WAITPID symbol is removed
1 parent 51379d6 commit cfb7395

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

UPGRADING.INTERNALS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ PHP 8.4 INTERNALS UPGRADE NOTES
130130
- Symbols HAVE_DLOPEN and HAVE_DLSYM have been removed.
131131
- Symbol HAVE_MYSQL has been removed.
132132
- Symbol HAVE_PDO_SQLITELIB has been removed.
133+
- Symbol HAVE_WAITPID has been removed.
133134
- M4 macro PHP_DEFINE (atomic includes) removed (use AC_DEFINE and config.h).
134135
- M4 macro PHP_WITH_SHARED has been removed (use PHP_ARG_WITH).
135136
- M4 macro PHP_STRUCT_FLOCK has been removed (use AC_CHECK_TYPES).

ext/pcntl/config.m4

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ PHP_ARG_ENABLE([pcntl],
44
[Enable pcntl support (CLI/CGI only)])])
55

66
if test "$PHP_PCNTL" != "no"; then
7-
AC_CHECK_FUNCS([fork waitpid sigaction],,
8-
[AC_MSG_ERROR([ext/pcntl: required function $ac_func() not found.])])
7+
for function in fork sigaction waitpid; do
8+
AC_CHECK_FUNC([$function],,
9+
[AC_MSG_ERROR([ext/pcntl: required function $function() not found.])])
10+
done
911

1012
AC_CHECK_FUNCS(m4_normalize([
1113
forkx

0 commit comments

Comments
 (0)