Skip to content

Commit 566499d

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
2 parents 97ad88c + 870aff5 commit 566499d

File tree

9 files changed

+52
-25
lines changed

9 files changed

+52
-25
lines changed

cmake/cmake/ConfigureChecks.cmake

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ else()
7676
check_include_files(resolv.h HAVE_RESOLV_H)
7777
endif()
7878

79-
check_include_files(strings.h HAVE_STRINGS_H)
79+
check_include_files(strings.h PHP_HAVE_STRINGS_H)
80+
set(HAVE_STRINGS_H ${PHP_HAVE_STRINGS_H})
81+
8082
check_include_files(sys/file.h HAVE_SYS_FILE_H)
8183
check_include_files(sys/ioctl.h HAVE_SYS_IOCTL_H)
8284
check_include_files(sys/ipc.h HAVE_SYS_IPC_H)
@@ -363,7 +365,10 @@ endblock()
363365

364366
check_symbol_exists(statvfs sys/statvfs.h HAVE_STATVFS)
365367
check_symbol_exists(std_syslog sys/syslog.h HAVE_STD_SYSLOG)
366-
check_symbol_exists(strcasecmp strings.h HAVE_STRCASECMP)
368+
369+
check_symbol_exists(strcasecmp strings.h PHP_HAVE_STRCASECMP)
370+
set(HAVE_STRCASECMP ${PHP_HAVE_STRCASECMP})
371+
367372
check_symbol_exists(symlink unistd.h HAVE_SYMLINK)
368373
check_symbol_exists(tzset time.h HAVE_TZSET)
369374
check_symbol_exists(unsetenv stdlib.h HAVE_UNSETENV)

cmake/cmake/platforms/Windows.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
3030
# PHP has nice() emulation implemented on Windows.
3131
set(HAVE_NICE TRUE)
3232

33-
# PHP defines strcasecmp in Zend/zend_config.w32.h.
34-
set(HAVE_STRCASECMP TRUE)
35-
3633
# PHP has syslog.h emulation implemented on Windows.
3734
set(HAVE_SYSLOG_H TRUE)
3835

@@ -48,6 +45,9 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
4845
# PHP has socketpair() emulation implemented on Windows.
4946
set(PHP_HAS_SOCKETPAIR TRUE)
5047

48+
# PHP defines strcasecmp in Zend/zend_config.w32.h.
49+
set(PHP_HAVE_STRCASECMP TRUE)
50+
5151
##############################################################################
5252
# To speed up the Windows build experience where configuration phase takes
5353
# much longer compared to POSIX-based environments, the following are always
@@ -134,7 +134,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
134134
set(HAVE_STD_SYSLOG FALSE)
135135
set(HAVE_STDDEF_H TRUE) # Defined by check_type_size().
136136
set(HAVE_STDINT_H TRUE) # Defined by check_type_size().
137-
set(HAVE_STRINGS_H FALSE)
138137
set(HAVE_STRLCAT FALSE)
139138
set(HAVE_STRLCPY FALSE)
140139
set(HAVE_STRNLEN TRUE)
@@ -259,6 +258,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
259258
set(PHP_HAVE_CREATEPROCESS TRUE)
260259
set(PHP_HAVE_FORK FALSE)
261260
set(PHP_HAVE_GRP_H FALSE)
261+
set(PHP_HAVE_STRINGS_H FALSE)
262262
set(PHP_HAVE_UNISTD_H FALSE)
263263
set(PHP_SAPI_CLI_HAVE_PS_STRINGS FALSE)
264264
set(PHP_SAPI_PHPDBG_HAS_UFFDIO_WRITEPROTECT_MODE_WP FALSE)

cmake/ext/curl/CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,13 @@ if(
152152
/* No SSL support */
153153
return 1;
154154
}
155-
]] PHP_EXT_CURL_HAS_CURL_OLD_OPENSSL)
155+
]] PHP_EXT_CURL_HAVE_CURL_OLD_OPENSSL)
156156
cmake_pop_check_state()
157+
set(HAVE_CURL_OLD_OPENSSL ${PHP_EXT_CURL_HAVE_CURL_OLD_OPENSSL})
157158

158-
if(NOT PHP_EXT_CURL_HAS_CURL_OLD_OPENSSL)
159+
if(NOT PHP_EXT_CURL_HAVE_CURL_OLD_OPENSSL)
159160
message(CHECK_FAIL "no")
160161
else()
161-
set(HAVE_CURL_OLD_OPENSSL TRUE)
162162
message(CHECK_PASS "yes")
163163
find_package(OpenSSL ${PHP_OPENSSL_MIN_VERSION})
164164
set_package_properties(
@@ -173,7 +173,8 @@ if(
173173
if(TARGET OpenSSL::Crypto)
174174
cmake_push_check_state(RESET)
175175
set(CMAKE_REQUIRED_LIBRARIES OpenSSL::Crypto)
176-
check_include_files(openssl/crypto.h HAVE_OPENSSL_CRYPTO_H)
176+
check_include_files(openssl/crypto.h PHP_EXT_CURL_HAVE_OPENSSL_CRYPTO_H)
177+
set(HAVE_OPENSSL_CRYPTO_H ${PHP_EXT_CURL_HAVE_OPENSSL_CRYPTO_H})
177178
cmake_pop_check_state()
178179
endif()
179180
endif()

cmake/ext/fileinfo/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ cmake_push_check_state(RESET)
9595
check_symbol_exists(strcasestr string.h PHP_EXT_FILEINFO_HAVE_STRCASESTR)
9696
set(HAVE_STRCASESTR ${PHP_EXT_FILEINFO_HAVE_STRCASESTR})
9797
cmake_pop_check_state()
98-
if(NOT HAVE_STRCASESTR)
98+
if(NOT PHP_EXT_FILEINFO_HAVE_STRCASESTR)
9999
message(STATUS "Using libmagic strcasestr implementation")
100100
target_sources(php_ext_fileinfo PRIVATE libmagic/strcasestr.c)
101101
endif()

cmake/ext/gd/CMakeLists.txt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ if(NOT PHP_EXT_GD_EXTERNAL)
328328

329329
set(HAVE_LIBPNG TRUE)
330330
set(HAVE_GD_PNG TRUE)
331+
set(HAVE_GD_GET_INTERPOLATION TRUE)
331332

332333
if(PHP_EXT_GD_AVIF)
333334
find_package(libavif 0.8.2)
@@ -486,13 +487,18 @@ else()
486487
cmake_push_check_state(RESET)
487488
set(CMAKE_REQUIRED_LIBRARIES GD::GD)
488489

489-
check_symbol_exists(gdFontCacheShutdown gd.h HAVE_GD_FREETYPE)
490-
check_symbol_exists(gdVersionString gd.h HAVE_GD_LIBVERSION)
490+
check_symbol_exists(gdFontCacheShutdown gd.h PHP_EXT_GD_HAVE_GD_FREETYPE)
491+
set(HAVE_GD_FREETYPE ${PHP_EXT_GD_HAVE_GD_FREETYPE})
492+
493+
check_symbol_exists(gdVersionString gd.h PHP_EXT_GD_HAVE_GD_LIBVERSION)
494+
set(HAVE_GD_LIBVERSION ${PHP_EXT_GD_HAVE_GD_LIBVERSION})
495+
491496
check_symbol_exists(
492497
gdImageGetInterpolationMethod
493498
gd.h
494-
HAVE_GD_GET_INTERPOLATION
499+
PHP_EXT_GD_HAVE_GD_GET_INTERPOLATION
495500
)
501+
set(HAVE_GD_GET_INTERPOLATION ${PHP_EXT_GD_HAVE_GD_GET_INTERPOLATION})
496502
cmake_pop_check_state()
497503
endif()
498504
endif()

cmake/ext/gd/cmake/config.h.in

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@
1111
/* Define to 1 if gd extension has FreeType support. */
1212
#cmakedefine HAVE_GD_FREETYPE 1
1313

14-
/* Define to 1 if GD library has the 'gdImageGetInterpolationMethod' function.
15-
*/
14+
/* Define to 1 if GD library has the 'gdImageGetInterpolationMethod' function
15+
(available as of libgd 2.1.1). */
1616
#cmakedefine HAVE_GD_GET_INTERPOLATION 1
1717

1818
/* Define to 1 if gd extension has JPEG support. */
1919
#cmakedefine HAVE_GD_JPG 1
2020

21-
/* Define to 1 if GD library has the 'gdVersionString' function. */
21+
/* Define to 1 if GD library has the 'gdVersionString' function (available as
22+
of libgd 2.1.1). */
2223
#cmakedefine HAVE_GD_LIBVERSION 1
2324

2425
/* Define to 1 if gd extension has PNG support. */

cmake/ext/ldap/CMakeLists.txt

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,23 @@ if(TARGET LDAP::LDAP)
9999
set(CMAKE_REQUIRED_LIBRARIES LDAP::LDAP)
100100

101101
# Sanity check.
102-
check_symbol_exists(ldap_sasl_bind_s ldap.h PHP_EXT_LDAP_HAS_LDAP_SASL_BIND_S)
103-
if(NOT PHP_EXT_LDAP_HAS_LDAP_SASL_BIND_S)
102+
check_symbol_exists(
103+
ldap_sasl_bind_s
104+
ldap.h
105+
PHP_EXT_LDAP_HAVE_LDAP_SASL_BIND_S
106+
)
107+
if(NOT PHP_EXT_LDAP_HAVE_LDAP_SASL_BIND_S)
104108
# Fallback to deprecated ldap_simple_bind_s().
105-
check_symbol_exists(ldap_simple_bind_s ldap.h PHP_HAS_LDAP_SIMPLE_BIND_S)
109+
check_symbol_exists(
110+
ldap_simple_bind_s
111+
ldap.h
112+
PHP_EXT_LDAP_HAVE_LDAP_SIMPLE_BIND_S
113+
)
106114
endif()
107-
if(NOT PHP_EXT_LDAP_HAS_LDAP_SASL_BIND_S AND NOT PHP_HAS_LDAP_SIMPLE_BIND_S)
115+
if(
116+
NOT PHP_EXT_LDAP_HAVE_LDAP_SASL_BIND_S
117+
AND NOT PHP_EXT_LDAP_HAVE_LDAP_SIMPLE_BIND_S
118+
)
108119
message(
109120
FATAL_ERROR
110121
"LDAP sanity check failed: neither 'ldap_sasl_bind_s()' nor "

cmake/ext/mbstring/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ if(PHP_EXT_MBSTRING_MBREGEX)
154154
{
155155
return (intptr_t)(ONIG_ENCODING_KOI8 + 1);
156156
}
157-
]] PHP_ONIG_KOI8)
157+
]] PHP_EXT_MBSTRING_ONIG_KOI8)
158158
cmake_pop_check_state()
159-
if(PHP_ONIG_KOI8)
159+
if(PHP_EXT_MBSTRING_ONIG_KOI8)
160160
message(CHECK_PASS "no")
161161
else()
162162
message(CHECK_FAIL "yes")

cmake/ext/mbstring/libmbfl/CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,11 @@ target_compile_definitions(
101101
)
102102

103103
# The libmbfl configuration header.
104-
check_include_files(strings.h HAVE_STRINGS_H)
105-
check_symbol_exists(strcasecmp strings.h HAVE_STRCASECMP)
104+
check_include_files(strings.h PHP_HAVE_STRINGS_H)
105+
set(HAVE_STRINGS ${PHP_HAVE_STRINGS_H})
106+
107+
check_symbol_exists(strcasecmp strings.h PHP_HAVE_STRCASECMP)
108+
set(HAVE_STRCASECMP ${PHP_HAVE_STRCASECMP})
106109

107110
cmake_path(
108111
RELATIVE_PATH

0 commit comments

Comments
 (0)