Skip to content

Commit 0a7c304

Browse files
committed
Merge branch 'PHP-8.4'
2 parents 3c0bb04 + 51906d9 commit 0a7c304

File tree

5 files changed

+105
-95
lines changed

5 files changed

+105
-95
lines changed

cmake/Zend/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,8 @@ if(NOT CMAKE_SIZEOF_VOID_P EQUAL 4)
607607
)
608608
endif()
609609

610+
configure_file(zend_config.cmake.h.in CMakeFiles/zend_config.h @ONLY)
611+
610612
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
611613
message(STATUS "Creating Zend/zend_config.h")
612614

cmake/Zend/zend_config.cmake.h.in

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
/* Define to 1 if _controlfp is present and usable. */
2+
#cmakedefine HAVE__CONTROLFP 1
3+
4+
/* Define to 1 if _controlfp_s is present and usable. */
5+
#cmakedefine HAVE__CONTROLFP_S 1
6+
7+
/* Define to 1 if _FPU_SETCW is present and usable. */
8+
#cmakedefine HAVE__FPU_SETCW 1
9+
10+
/* Define to 1 if '__cpuid_count' is available. */
11+
#cmakedefine HAVE_CPUID_COUNT 1
12+
13+
/* Define to 1 if you have the <cpuid.h> header file. */
14+
#cmakedefine HAVE_CPUID_H 1
15+
16+
/* Define to 1 if fpsetprec is present and usable. */
17+
#cmakedefine HAVE_FPSETPREC 1
18+
19+
/* Define to 1 if FPU control word can be manipulated by inline assembler. */
20+
#cmakedefine HAVE_FPU_INLINE_ASM_X86 1
21+
22+
/* Define to 1 if the target system has support for global register variables.
23+
*/
24+
#cmakedefine HAVE_GCC_GLOBAL_REGS 1
25+
26+
/* Define to 1 if you have the 'getpid' function. */
27+
#cmakedefine HAVE_GETPID 1
28+
29+
/* Define to 1 if you have the 'gettid' function. */
30+
#cmakedefine HAVE_GETTID 1
31+
32+
/* Define to 1 if you have the 'kill' function. */
33+
#cmakedefine HAVE_KILL 1
34+
35+
/* Define to 1 if you have the <libproc.h> header file. */
36+
#cmakedefine HAVE_LIBPROC_H 1
37+
38+
/* Define to 1 if you have the 'mempcpy' function. */
39+
#cmakedefine HAVE_MEMPCPY 1
40+
41+
/* Define to 1 if you have the 'mremap' function. */
42+
#cmakedefine HAVE_MREMAP 1
43+
44+
/* Define to 1 if you have the 'pthread_attr_get_np' function. */
45+
#cmakedefine HAVE_PTHREAD_ATTR_GET_NP 1
46+
47+
/* Define to 1 if you have the 'pthread_attr_getstack' function. */
48+
#cmakedefine HAVE_PTHREAD_ATTR_GETSTACK 1
49+
50+
/* Define to 1 if you have the 'pthread_get_stackaddr_np' function. */
51+
#cmakedefine HAVE_PTHREAD_GET_STACKADDR_NP 1
52+
53+
/* Define to 1 if you have the 'pthread_getattr_np' function. */
54+
#cmakedefine HAVE_PTHREAD_GETATTR_NP 1
55+
56+
/* Define to 1 if you have the 'pthread_stackseg_np' function. */
57+
#cmakedefine HAVE_PTHREAD_STACKSEG_NP 1
58+
59+
/* Define to 1 if you have the 'sigaction' function. */
60+
#cmakedefine HAVE_SIGACTION 1
61+
62+
/* Define to 1 if checking the stack limit is supported. */
63+
#cmakedefine ZEND_CHECK_STACK_LIMIT 1
64+
65+
/* Define to 1 if Zend fiber uses ucontext instead of boost context. */
66+
#cmakedefine ZEND_FIBER_UCONTEXT 1
67+
68+
/* Define to 1 if Zend max execution timers are supported and enabled. */
69+
#cmakedefine ZEND_MAX_EXECUTION_TIMERS 1
70+
71+
/* Number of bytes for the ZEND_MM alignment. */
72+
#cmakedefine ZEND_MM_ALIGNMENT @ZEND_MM_ALIGNMENT@
73+
74+
/* Number of bytes for the logarithmic ZEND_MM alignment. */
75+
#cmakedefine ZEND_MM_ALIGNMENT_LOG2 @ZEND_MM_ALIGNMENT_LOG2@
76+
77+
/* Define to 1 if ZEND_MM needs 8-byte realignment, and to 0 if not. */
78+
#cmakedefine01 ZEND_MM_NEED_EIGHT_BYTE_REALIGNMENT
79+
80+
/* Define to 1 if Zend signal handling is supported and enabled. */
81+
#cmakedefine ZEND_SIGNALS 1

cmake/ext/pdo_odbc/CMakeLists.txt

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,11 @@ elseif(EXT_PDO_ODBC_TYPE STREQUAL "unixODBC")
151151
set(ODBC_TYPE "odbc")
152152
endif()
153153

154-
block()
155-
if(EXT_PDO_ODBC_TYPE STREQUAL "generic" AND EXT_PDO_ODBC_LIBRARY)
156-
set(type "${EXT_PDO_ODBC_TYPE}-${EXT_PDO_ODBC_LIBRARY}")
157-
else()
158-
set(type "${EXT_PDO_ODBC_TYPE}")
159-
endif()
160-
161-
set(PDO_ODBC_TYPE "${type}")
162-
endblock()
154+
if(EXT_PDO_ODBC_TYPE STREQUAL "generic" AND EXT_PDO_ODBC_LIBRARY)
155+
set(PDO_ODBC_TYPE "${EXT_PDO_ODBC_TYPE}-${EXT_PDO_ODBC_LIBRARY}")
156+
else()
157+
set(PDO_ODBC_TYPE "${EXT_PDO_ODBC_TYPE}")
158+
endif()
163159

164160
if(EXT_PDO_ODBC_ROOT AND NOT ODBC_ROOT)
165161
set(ODBC_ROOT ${EXT_PDO_ODBC_ROOT})

cmake/main/CMakeLists.txt

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -389,19 +389,23 @@ function(_php_main_create_files)
389389
message(STATUS "Creating main/php_version.h")
390390
configure_file(main/php_version.h.in main/php_version.h @ONLY)
391391

392-
# Append extensions config.h contents.
393-
set(extensionsConfigH "")
392+
# Add Zend engine configuration.
393+
file(READ ${CMAKE_CURRENT_BINARY_DIR}/Zend/CMakeFiles/zend_config.h config)
394+
string(STRIP "${config}" ZEND_CONFIGURATION)
395+
396+
# Add extensions configuration.
397+
set(config "")
394398
get_cmake_property(extensions PHP_EXTENSIONS)
399+
list(SORT extensions COMPARE NATURAL)
395400
foreach(extension IN LISTS extensions)
396401
if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/ext/${extension}/config.h)
397402
file(READ ${CMAKE_CURRENT_BINARY_DIR}/ext/${extension}/config.h content)
398403
if(content)
399-
string(APPEND extensionsConfigH "\n${content}")
404+
string(APPEND config "\n${content}")
400405
endif()
401406
endif()
402407
endforeach()
403-
string(STRIP "${extensionsConfigH}" extensionsConfigH)
404-
set(PHP_EXTENSIONS_CONFIGURATION "${extensionsConfigH}")
408+
string(STRIP "${config}" PHP_EXTENSIONS_CONFIGURATION)
405409

406410
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
407411
set(PHP_CONFIG_H_WINDOWS 1)

cmake/main/php_config.cmake.h.in

Lines changed: 8 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,6 @@
111111
/* Define to 1 if you have the 'copy_file_range' function. */
112112
#cmakedefine HAVE_COPY_FILE_RANGE 1
113113

114-
/* Define to 1 if '__cpuid_count' is available. */
115-
#cmakedefine HAVE_CPUID_COUNT 1
116-
117-
/* Define to 1 if you have the <cpuid.h> header file. */
118-
#cmakedefine HAVE_CPUID_H 1
119-
120114
/* Define to 1 if you have the 'ctime_r' function. */
121115
#cmakedefine HAVE_CTIME_R 1
122116

@@ -162,12 +156,6 @@
162156
/* Define to 1 if PHP-FPM has ACL support. */
163157
#cmakedefine HAVE_FPM_ACL 1
164158

165-
/* Define to 1 if fpsetprec is present and usable. */
166-
#cmakedefine HAVE_FPSETPREC 1
167-
168-
/* Define to 1 if FPU control word can be manipulated by inline assembler. */
169-
#cmakedefine HAVE_FPU_INLINE_ASM_X86 1
170-
171159
/* Define to 1 if you have the 'ftok' function. */
172160
#cmakedefine HAVE_FTOK 1
173161

@@ -192,10 +180,6 @@
192180
/* Define to 1 if you have the 'gai_strerror' function. */
193181
#cmakedefine HAVE_GAI_STRERROR 1
194182

195-
/* Define to 1 if the target system has support for global register variables.
196-
*/
197-
#cmakedefine HAVE_GCC_GLOBAL_REGS 1
198-
199183
/* Define to 1 if GCOV code coverage is enabled. */
200184
#cmakedefine HAVE_GCOV 1
201185

@@ -220,9 +204,6 @@
220204
/* Define to 1 if you have the 'getlogin' function. */
221205
#cmakedefine HAVE_GETLOGIN 1
222206

223-
/* Define to 1 if you have the 'getpid' function. */
224-
#cmakedefine HAVE_GETPID 1
225-
226207
/* Define to 1 if you have the 'getprotobyname' function. */
227208
#cmakedefine HAVE_GETPROTOBYNAME 1
228209

@@ -250,9 +231,6 @@
250231
/* Define to 1 if you have the 'getsid' function. */
251232
#cmakedefine HAVE_GETSID 1
252233

253-
/* Define to 1 if you have the 'gettid' function. */
254-
#cmakedefine HAVE_GETTID 1
255-
256234
/* Define to 1 if you have the 'gettimeofday' function. */
257235
#cmakedefine HAVE_GETTIMEOFDAY 1
258236

@@ -277,9 +255,6 @@
277255
/* Define to 1 if IPv6 is enabled and supported. */
278256
#cmakedefine HAVE_IPV6 1
279257

280-
/* Define to 1 if you have the 'kill' function. */
281-
#cmakedefine HAVE_KILL 1
282-
283258
/* Define to 1 if system has a working 'kqueue' function. */
284259
#cmakedefine HAVE_KQUEUE 1
285260

@@ -295,9 +270,6 @@
295270
/* Define to 1 if system has the 'libedit' library. */
296271
#cmakedefine HAVE_LIBEDIT 1
297272

298-
/* Define to 1 if you have the <libproc.h> header file. */
299-
#cmakedefine HAVE_LIBPROC_H 1
300-
301273
/* Define to 1 if you have the <linux/sock_diag.h> header file. */
302274
#cmakedefine HAVE_LINUX_SOCK_DIAG_H 1
303275

@@ -328,9 +300,6 @@
328300
/* Define to 1 if you have the 'memmem' function. */
329301
#cmakedefine HAVE_MEMMEM 1
330302

331-
/* Define to 1 if you have the 'mempcpy' function. */
332-
#cmakedefine HAVE_MEMPCPY 1
333-
334303
/* Define to 1 if you have the 'memrchr' function. */
335304
#cmakedefine HAVE_MEMRCHR 1
336305

@@ -340,9 +309,6 @@
340309
/* Define to 1 if you have the 'mmap' function. */
341310
#cmakedefine HAVE_MMAP 1
342311

343-
/* Define to 1 if you have the 'mremap' function. */
344-
#cmakedefine HAVE_MREMAP 1
345-
346312
/* Define to 1 if you have the 'nanosleep' function. */
347313
#cmakedefine HAVE_NANOSLEEP 1
348314

@@ -385,24 +351,12 @@
385351
/* Define if the PS_STRINGS exists. */
386352
#cmakedefine HAVE_PS_STRINGS
387353

388-
/* Define to 1 if you have the 'pthread_attr_getstack' function. */
389-
#cmakedefine HAVE_PTHREAD_ATTR_GETSTACK 1
390-
391-
/* Define to 1 if you have the 'pthread_attr_get_np' function. */
392-
#cmakedefine HAVE_PTHREAD_ATTR_GET_NP 1
393-
394-
/* Define to 1 if you have the 'pthread_getattr_np' function. */
395-
#cmakedefine HAVE_PTHREAD_GETATTR_NP 1
396-
397354
/* Define to 1 if you have the 'pthread_get_stackaddr_np' function. */
398355
#cmakedefine HAVE_PTHREAD_GET_STACKADDR_NP 1
399356

400357
/* Define to 1 if you have the 'pthread_jit_write_protect_np' function. */
401358
#cmakedefine HAVE_PTHREAD_JIT_WRITE_PROTECT_NP 1
402359

403-
/* Define to 1 if you have the 'pthread_stackseg_np' function. */
404-
#cmakedefine HAVE_PTHREAD_STACKSEG_NP 1
405-
406360
/* Define to 1 if you have the 'ptrace' function. */
407361
#cmakedefine HAVE_PTRACE 1
408362

@@ -451,9 +405,6 @@
451405
/* Define to 1 if you have the 'shutdown' function. */
452406
#cmakedefine HAVE_SHUTDOWN 1
453407

454-
/* Define to 1 if you have the 'sigaction' function. */
455-
#cmakedefine HAVE_SIGACTION 1
456-
457408
/* Define to 1 if you have the 'sigprocmask' function. */
458409
#cmakedefine HAVE_SIGPROCMASK 1
459410

@@ -662,15 +613,6 @@
662613
/* Define to 1 if you have the <wmmintrin.h> header file. */
663614
#cmakedefine HAVE_WMMINTRIN_H 1
664615

665-
/* Define to 1 if _controlfp is present and usable. */
666-
#cmakedefine HAVE__CONTROLFP 1
667-
668-
/* Define to 1 if _controlfp_s is present and usable. */
669-
#cmakedefine HAVE__CONTROLFP_S 1
670-
671-
/* Define to 1 if _FPU_SETCW is present and usable. */
672-
#cmakedefine HAVE__FPU_SETCW 1
673-
674616
/* Define to 1 if 'major', 'minor', and 'makedev' are declared in <mkdev.h>.
675617
*/
676618
#cmakedefine MAJOR_IN_MKDEV 1
@@ -838,43 +780,28 @@
838780
/* Define if processor uses big-endian word. */
839781
#cmakedefine WORDS_BIGENDIAN
840782

841-
/* Define to 1 if checking the stack limit is supported. */
842-
#cmakedefine ZEND_CHECK_STACK_LIMIT 1
843-
844783
/* Define to 1 if debugging is enabled, and to 0 if not.
845784
TODO: This is still not good enough because multi-config generators would
846785
then need separate php_config.h files for each build type. */
847786
#ifndef ZEND_DEBUG
848787
# define ZEND_DEBUG $<IF:$<CONFIG:Debug,DebugAssertions>,1,0>
849788
#endif
850789

851-
/* Define to 1 if Zend fiber uses ucontext instead of boost context. */
852-
#cmakedefine ZEND_FIBER_UCONTEXT 1
853-
854-
/* Define to 1 if Zend max execution timers are supported and enabled. */
855-
#cmakedefine ZEND_MAX_EXECUTION_TIMERS 1
856-
857-
/* Number of bytes for the ZEND_MM alignment. */
858-
#cmakedefine ZEND_MM_ALIGNMENT @ZEND_MM_ALIGNMENT@
859-
860-
/* Number of bytes for the logarithmic ZEND_MM alignment. */
861-
#cmakedefine ZEND_MM_ALIGNMENT_LOG2 @ZEND_MM_ALIGNMENT_LOG2@
862-
863-
/* Define to 1 if ZEND_MM needs 8-byte realignment, and to 0 if not. */
864-
#cmakedefine01 ZEND_MM_NEED_EIGHT_BYTE_REALIGNMENT
865-
866-
/* Define to 1 if Zend signal handling is supported and enabled. */
867-
#cmakedefine ZEND_SIGNALS 1
868-
869790
/* Define to 1 if thread safety (ZTS) is enabled. */
870791
#cmakedefine ZTS 1
871792

872793
/* Define to 1 when using musl libc. */
873794
#cmakedefine __MUSL__ 1
874795

875-
/*************************************************************************
796+
/*****************************************************************************
797+
Zend engine configuration
798+
****************************************************************************/
799+
800+
@ZEND_CONFIGURATION@
801+
802+
/*****************************************************************************
876803
PHP extensions configuration
877-
************************************************************************/
804+
****************************************************************************/
878805

879806
@PHP_EXTENSIONS_CONFIGURATION@
880807

0 commit comments

Comments
 (0)