Skip to content

Commit 0e8daa5

Browse files
committed
Sync with upstream build system changes
1 parent 06805d8 commit 0e8daa5

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

cmake/cmake/ConfigureChecks.cmake

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -171,15 +171,6 @@ if(SIZEOF_INT STREQUAL "")
171171
set(SIZEOF_INT_CODE "#define SIZEOF_INT 0")
172172
endif()
173173

174-
# The intmax_t is always available by C99 standard and its size varies between
175-
# 32-bit and 64-bit target platforms. PHP on Windows sets SIZEOF_INTMAX_T to 0,
176-
# otherwise the type and its size are available on Windows.
177-
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
178-
set(SIZEOF_INTMAX_T_CODE "#define SIZEOF_INTMAX_T 0")
179-
else()
180-
check_type_size("intmax_t" SIZEOF_INTMAX_T)
181-
endif()
182-
183174
check_type_size("long" SIZEOF_LONG)
184175
if(SIZEOF_LONG STREQUAL "")
185176
set(SIZEOF_LONG_CODE "#define SIZEOF_LONG 0")
@@ -310,6 +301,9 @@ cmake_push_check_state(RESET)
310301
check_symbol_exists(memfd_create sys/mman.h HAVE_MEMFD_CREATE)
311302
cmake_pop_check_state()
312303

304+
# The memset_explicit() is available as of C23 standard.
305+
check_symbol_exists(memset_explicit string.h HAVE_MEMSET_EXPLICIT)
306+
313307
check_symbol_exists(mkstemp stdlib.h HAVE_MKSTEMP)
314308
check_symbol_exists(mmap sys/mman.h HAVE_MMAP)
315309
check_symbol_exists(nice unistd.h HAVE_NICE)

cmake/main/cmake/php_config.h.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,9 @@
255255
/* Define to 1 if you have the 'memrchr' function. */
256256
#cmakedefine HAVE_MEMRCHR 1
257257

258+
/* Define to 1 if you have the 'memset_explicit' function. */
259+
#cmakedefine HAVE_MEMSET_EXPLICIT 1
260+
258261
/* Define to 1 if you have the 'mkstemp' function. */
259262
#cmakedefine HAVE_MKSTEMP 1
260263

@@ -614,9 +617,6 @@
614617
/* The size of 'int', as computed by sizeof. */
615618
@SIZEOF_INT_CODE@
616619

617-
/* The size of 'intmax_t', as computed by sizeof. */
618-
@SIZEOF_INTMAX_T_CODE@
619-
620620
/* The size of 'long', as computed by sizeof. */
621621
@SIZEOF_LONG_CODE@
622622

docs/evolution.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,7 @@ PHP coding standards now use the C11 standard.
944944
* Bundled file library in ext/fileinfo upgraded to 5.46.
945945
* Bundled pcre2lib in ext/pcre upgraded from 10.44 to 10.45.
946946
* Added new extensions lexbor and uri as always enabled.
947+
* The `SIZEOF_INTMAX_T` preprocessor macro has been removed.
947948
* The `SIZEOF_PTRDIFF_T` preprocessor macro has been removed.
948949
949950
#### Autotools
@@ -964,6 +965,7 @@ PHP coding standards now use the C11 standard.
964965
* The `PHP_ODBC_CFLAGS`, `PHP_ODBC_LFLAGS`, `PHP_ODBC_LIBS`, and `PHP_ODBC_TYPE`
965966
preprocessor macros defined by ext/odbc are now defined in `php_config.h`
966967
instead of the `build-defs.h` header.
968+
* The `HAVE_INTMAX_T` preprocessor macro has been removed.
967969
* The `HAVE_PTRDIFF_T` preprocessor macro has been removed.
968970
969971
#### Windows

0 commit comments

Comments
 (0)