Skip to content

Commit 9371c91

Browse files
committed
Merge branch 'PHP-8.4'
2 parents 0574fad + 566499d commit 9371c91

File tree

9 files changed

+49
-23
lines changed

9 files changed

+49
-23
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)
@@ -344,7 +346,10 @@ endblock()
344346

345347
check_symbol_exists(statvfs sys/statvfs.h HAVE_STATVFS)
346348
check_symbol_exists(std_syslog sys/syslog.h HAVE_STD_SYSLOG)
347-
check_symbol_exists(strcasecmp strings.h HAVE_STRCASECMP)
349+
350+
check_symbol_exists(strcasecmp strings.h PHP_HAVE_STRCASECMP)
351+
set(HAVE_STRCASECMP ${PHP_HAVE_STRCASECMP})
352+
348353
check_symbol_exists(symlink unistd.h HAVE_SYMLINK)
349354
check_symbol_exists(tzset time.h HAVE_TZSET)
350355
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
@@ -27,9 +27,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
2727
# PHP has nice() emulation implemented on Windows.
2828
set(HAVE_NICE TRUE)
2929

30-
# PHP defines strcasecmp in Zend/zend_config.w32.h.
31-
set(HAVE_STRCASECMP TRUE)
32-
3330
# PHP has syslog.h emulation implemented on Windows.
3431
set(HAVE_SYSLOG_H TRUE)
3532

@@ -45,6 +42,9 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
4542
# PHP has socketpair() emulation implemented on Windows.
4643
set(PHP_HAS_SOCKETPAIR TRUE)
4744

45+
# PHP defines strcasecmp in Zend/zend_config.w32.h.
46+
set(PHP_HAVE_STRCASECMP TRUE)
47+
4848
##############################################################################
4949
# To speed up the Windows build experience where configuration phase takes
5050
# much longer compared to POSIX-based environments, the following are always
@@ -136,7 +136,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
136136
set(HAVE_STD_SYSLOG FALSE)
137137
set(HAVE_STDDEF_H TRUE) # Defined by check_type_size().
138138
set(HAVE_STDINT_H TRUE) # Defined by check_type_size().
139-
set(HAVE_STRINGS_H FALSE)
140139
set(HAVE_STRLCAT FALSE)
141140
set(HAVE_STRLCPY FALSE)
142141
set(HAVE_STRNLEN TRUE)
@@ -262,6 +261,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
262261
set(PHP_HAVE_CREATEPROCESS TRUE)
263262
set(PHP_HAVE_FORK FALSE)
264263
set(PHP_HAVE_GRP_H FALSE)
264+
set(PHP_HAVE_STRINGS_H FALSE)
265265
set(PHP_HAVE_UNISTD_H FALSE)
266266
set(PHP_SAPI_CLI_HAVE_PS_STRINGS FALSE)
267267
set(PHP_SAPI_PHPDBG_HAS_UFFDIO_WRITEPROTECT_MODE_WP FALSE)

cmake/ext/curl/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,10 @@ if(
154154
/* No SSL support */
155155
return 1;
156156
}
157-
]] PHP_EXT_CURL_HAS_CURL_OLD_OPENSSL)
157+
]] PHP_EXT_CURL_HAVE_CURL_OLD_OPENSSL)
158158
cmake_pop_check_state()
159159

160-
if(PHP_EXT_CURL_HAS_CURL_OLD_OPENSSL)
160+
if(PHP_EXT_CURL_HAVE_CURL_OLD_OPENSSL)
161161
message(CHECK_FAIL "no")
162162
message(
163163
FATAL_ERROR

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
@@ -327,6 +327,7 @@ if(NOT PHP_EXT_GD_EXTERNAL)
327327

328328
set(HAVE_LIBPNG TRUE)
329329
set(HAVE_GD_PNG TRUE)
330+
set(HAVE_GD_GET_INTERPOLATION TRUE)
330331

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

488-
check_symbol_exists(gdFontCacheShutdown gd.h HAVE_GD_FREETYPE)
489-
check_symbol_exists(gdVersionString gd.h HAVE_GD_LIBVERSION)
489+
check_symbol_exists(gdFontCacheShutdown gd.h PHP_EXT_GD_HAVE_GD_FREETYPE)
490+
set(HAVE_GD_FREETYPE ${PHP_EXT_GD_HAVE_GD_FREETYPE})
491+
492+
check_symbol_exists(gdVersionString gd.h PHP_EXT_GD_HAVE_GD_LIBVERSION)
493+
set(HAVE_GD_LIBVERSION ${PHP_EXT_GD_HAVE_GD_LIBVERSION})
494+
490495
check_symbol_exists(
491496
gdImageGetInterpolationMethod
492497
gd.h
493-
HAVE_GD_GET_INTERPOLATION
498+
PHP_EXT_GD_HAVE_GD_GET_INTERPOLATION
494499
)
500+
set(HAVE_GD_GET_INTERPOLATION ${PHP_EXT_GD_HAVE_GD_GET_INTERPOLATION})
495501
cmake_pop_check_state()
496502
endif()
497503
endif()

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

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

10-
/* Define to 1 if GD library has the 'gdImageGetInterpolationMethod' function.
11-
*/
10+
/* Define to 1 if GD library has the 'gdImageGetInterpolationMethod' function
11+
(available as of libgd 2.1.1). */
1212
#cmakedefine HAVE_GD_GET_INTERPOLATION 1
1313

1414
/* Define to 1 if gd extension has JPEG support. */
1515
#cmakedefine HAVE_GD_JPG 1
1616

17-
/* Define to 1 if GD library has the 'gdVersionString' function. */
17+
/* Define to 1 if GD library has the 'gdVersionString' function (available as
18+
of libgd 2.1.1). */
1819
#cmakedefine HAVE_GD_LIBVERSION 1
1920

2021
/* 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)