@@ -83,13 +83,13 @@ target_compile_definitions(php_ext_pcntl PRIVATE ZEND_ENABLE_STATIC_TSRMLS_CACHE
8383
8484# Check for required functions.
8585block()
86- check_symbol_exists(fork unistd.h HAVE_FORK )
87- check_symbol_exists(sigaction signal.h HAVE_SIGACTION )
88- check_symbol_exists(waitpid sys/wait.h HAVE_WAITPID )
86+ check_symbol_exists(fork unistd.h PHP_HAVE_FORK )
87+ check_symbol_exists(sigaction signal.h PHP_HAVE_SIGACTION )
88+ check_symbol_exists(waitpid sys/wait.h PHP_HAVE_WAITPID )
8989
9090 foreach (function fork sigaction waitpid)
9191 string (TOUPPER ${function} const)
92- if (NOT HAVE_ ${const} )
92+ if (NOT PHP_HAVE_ ${const} )
9393 message (
9494 FATAL_ERROR
9595 "ext/pcntl: required function '${function} ()' not found."
@@ -98,25 +98,42 @@ block()
9898 endforeach ()
9999endblock()
100100
101- check_symbol_exists(forkx sys/fork.h HAVE_FORKX)
102- check_symbol_exists(getpriority sys/resource .h HAVE_GETPRIORITY)
103- check_symbol_exists(rfork unistd.h HAVE_RFORK)
104- check_symbol_exists(setpriority sys/resource .h HAVE_SETPRIORITY)
105- check_symbol_exists(sigtimedwait signal.h HAVE_SIGTIMEDWAIT)
106- check_symbol_exists(sigwaitinfo signal.h HAVE_SIGWAITINFO)
101+ check_symbol_exists(forkx sys/fork.h PHP_EXT_PCNTL_HAVE_FORKX)
102+ set (HAVE_FORKX ${PHP_EXT_PCNTL_HAVE_FORKX} )
103+
104+ check_symbol_exists(getpriority sys/resource .h PHP_EXT_PCNTL_HAVE_GETPRIORITY)
105+ set (HAVE_GETPRIORITY ${PHP_EXT_PCNTL_HAVE_GETPRIORITY} )
106+
107+ check_symbol_exists(rfork unistd.h PHP_EXT_PCNTL_HAVE_RFORK)
108+ set (HAVE_RFORK ${PHP_EXT_PCNTL_HAVE_RFORK} )
109+
110+ check_symbol_exists(setpriority sys/resource .h PHP_EXT_PCNTL_HAVE_SETPRIORITY)
111+ set (HAVE_SETPRIORITY ${PHP_EXT_PCNTL_HAVE_SETPRIORITY} )
112+
113+ check_symbol_exists(sigtimedwait signal.h PHP_EXT_PCNTL_HAVE_SIGTIMEDWAIT)
114+ set (HAVE_SIGTIMEDWAIT ${PHP_EXT_PCNTL_HAVE_SIGTIMEDWAIT} )
115+
116+ check_symbol_exists(sigwaitinfo signal.h PHP_EXT_PCNTL_HAVE_SIGWAITINFO)
117+ set (HAVE_SIGWAITINFO ${PHP_EXT_PCNTL_HAVE_SIGWAITINFO} )
118+
107119cmake_push_check_state(RESET)
108120 set (CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
109- check_symbol_exists(unshare sched.h HAVE_UNSHARE)
121+ check_symbol_exists(unshare sched.h PHP_EXT_PCNTL_HAVE_UNSHARE)
122+ set (HAVE_UNSHARE ${PHP_EXT_PCNTL_HAVE_UNSHARE} )
110123cmake_pop_check_state()
111- check_symbol_exists(wait3 sys/wait.h HAVE_WAIT3)
112- check_symbol_exists(wait4 sys/wait.h HAVE_WAIT4)
124+
125+ check_symbol_exists(wait3 sys/wait.h PHP_EXT_PCNTL_HAVE_WAIT3)
126+ set (HAVE_WAIT3 ${PHP_EXT_PCNTL_HAVE_WAIT3} )
127+
128+ check_symbol_exists(wait4 sys/wait.h PHP_EXT_PCNTL_HAVE_WAIT4)
129+ set (HAVE_WAIT4 ${PHP_EXT_PCNTL_HAVE_WAIT4} )
113130
114131cmake_push_check_state(RESET)
115132 set (CMAKE_EXTRA_INCLUDE_FILES "signal.h" )
116- check_type_size(siginfo_t STRUCT_SIGINFO_T )
133+ check_type_size(siginfo_t PHP_EXT_PCNTL_STRUCT_SIGINFO_T )
117134cmake_pop_check_state()
118135
119- if (HAVE_STRUCT_SIGINFO_T )
136+ if (HAVE_PHP_EXT_PCNTL_STRUCT_SIGINFO_T )
120137 target_compile_definitions (php_ext_pcntl PRIVATE HAVE_STRUCT_SIGINFO_T)
121138endif ()
122139
0 commit comments