Skip to content

Commit b6d6f99

Browse files
committed
Merge branch 'PHP-8.4'
2 parents eaa51e4 + a2d844d commit b6d6f99

File tree

3 files changed

+42
-36
lines changed

3 files changed

+42
-36
lines changed

cmake/Zend/CMakeLists.txt

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -64,19 +64,6 @@ include(FeatureSummary)
6464
include(PHP/AddCustomCommand)
6565
include(PHP/SearchLibraries)
6666

67-
################################################################################
68-
# Configuration.
69-
################################################################################
70-
71-
cmake_dependent_option(
72-
ZEND_SIGNALS
73-
"Enable Zend signal handling"
74-
ON
75-
[[NOT CMAKE_SYSTEM_NAME STREQUAL "Windows"]]
76-
OFF
77-
)
78-
mark_as_advanced(ZEND_SIGNALS)
79-
8067
################################################################################
8168
# Add library.
8269
################################################################################
@@ -462,28 +449,7 @@ include(cmake/Fibers.cmake)
462449
include(cmake/GenerateGrammar.cmake)
463450
include(cmake/GlobalRegisterVariables.cmake)
464451
include(cmake/MaxExecutionTimers.cmake)
465-
466-
################################################################################
467-
# Zend signals.
468-
################################################################################
469-
470-
message(CHECK_START "Checking whether to enable Zend signal handling")
471-
check_symbol_exists(sigaction signal.h HAVE_SIGACTION)
472-
if(HAVE_SIGACTION AND ZEND_SIGNALS)
473-
message(CHECK_PASS "yes")
474-
475-
# zend_config.h (or its parent php_config.h) isn't included in some zend_*
476-
# files, therefore also compilation definition is added.
477-
target_compile_definitions(zend PUBLIC ZEND_SIGNALS)
478-
else()
479-
set(ZEND_SIGNALS OFF)
480-
message(CHECK_FAIL "no")
481-
endif()
482-
add_feature_info(
483-
"Zend signals"
484-
ZEND_SIGNALS
485-
"signal handling for performance"
486-
)
452+
include(cmake/Signals.cmake)
487453

488454
################################################################################
489455
# Create files and set installation.

cmake/Zend/cmake/Signals.cmake

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#[=============================================================================[
2+
Check whether to enable Zend signals.
3+
#]=============================================================================]
4+
5+
include(CheckSymbolExists)
6+
include(CMakeDependentOption)
7+
include(FeatureSummary)
8+
9+
cmake_dependent_option(
10+
ZEND_SIGNALS
11+
"Enable Zend signal handling"
12+
ON
13+
[[NOT CMAKE_SYSTEM_NAME STREQUAL "Windows"]]
14+
OFF
15+
)
16+
mark_as_advanced(ZEND_SIGNALS)
17+
18+
message(CHECK_START "Checking whether to enable Zend signal handling")
19+
20+
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
21+
set(HAVE_SIGACTION FALSE)
22+
endif()
23+
24+
check_symbol_exists(sigaction signal.h HAVE_SIGACTION)
25+
26+
if(HAVE_SIGACTION AND ZEND_SIGNALS)
27+
message(CHECK_PASS "yes")
28+
29+
# zend_config.h (or its wrapper php_config.h) isn't included in some zend_*
30+
# files, therefore also compilation definition is added.
31+
target_compile_definitions(zend PUBLIC ZEND_SIGNALS)
32+
else()
33+
set(ZEND_SIGNALS OFF)
34+
message(CHECK_FAIL "no")
35+
endif()
36+
37+
add_feature_info(
38+
"Zend signals"
39+
ZEND_SIGNALS
40+
"signal handling for performance"
41+
)

cmake/cmake/platforms/Windows.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
132132
set(HAVE_SETITIMER FALSE)
133133
set(HAVE_SETPROCTITLE FALSE)
134134
set(HAVE_SHM_CREATE_LARGEPAGE FALSE)
135-
set(HAVE_SIGACTION FALSE)
136135
set(HAVE_SIGPROCMASK FALSE)
137136
set(HAVE_SIZEOF_GID_T FALSE)
138137
set(HAVE_SIZEOF_UID_T FALSE)

0 commit comments

Comments
 (0)