Skip to content

Commit a2d844d

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
2 parents cefe3a6 + 7c759ff commit a2d844d

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
################################################################################
@@ -460,28 +447,7 @@ include(cmake/Fibers.cmake)
460447
include(cmake/GenerateGrammar.cmake)
461448
include(cmake/GlobalRegisterVariables.cmake)
462449
include(cmake/MaxExecutionTimers.cmake)
463-
464-
################################################################################
465-
# Zend signals.
466-
################################################################################
467-
468-
message(CHECK_START "Checking whether to enable Zend signal handling")
469-
check_symbol_exists(sigaction signal.h HAVE_SIGACTION)
470-
if(HAVE_SIGACTION AND ZEND_SIGNALS)
471-
message(CHECK_PASS "yes")
472-
473-
# zend_config.h (or its parent php_config.h) isn't included in some zend_*
474-
# files, therefore also compilation definition is added.
475-
target_compile_definitions(zend PUBLIC ZEND_SIGNALS)
476-
else()
477-
set(ZEND_SIGNALS OFF)
478-
message(CHECK_FAIL "no")
479-
endif()
480-
add_feature_info(
481-
"Zend signals"
482-
ZEND_SIGNALS
483-
"signal handling for performance"
484-
)
450+
include(cmake/Signals.cmake)
485451

486452
################################################################################
487453
# 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
@@ -130,7 +130,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
130130
set(HAVE_SETITIMER FALSE)
131131
set(HAVE_SETPROCTITLE FALSE)
132132
set(HAVE_SHM_CREATE_LARGEPAGE FALSE)
133-
set(HAVE_SIGACTION FALSE)
134133
set(HAVE_SIGPROCMASK FALSE)
135134
set(HAVE_SIZEOF_GID_T FALSE)
136135
set(HAVE_SIZEOF_SSIZE_T FALSE)

0 commit comments

Comments
 (0)