Skip to content

Commit 6b8eb13

Browse files
committed
Merge branch 'PHP-8.4'
2 parents b928a3f + 4bc2fce commit 6b8eb13

File tree

3 files changed

+17
-34
lines changed

3 files changed

+17
-34
lines changed

cmake/cmake/ConfigureChecks.cmake

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,13 @@ if(SIZEOF_INT STREQUAL "")
170170
set(SIZEOF_INT_CODE "#define SIZEOF_INT 0")
171171
endif()
172172

173-
# TODO: PHP on Windows sets the SIZEOF_INTMAX_T to 0 to skip certain checks,
174-
# otherwise the intmax_t type and its size are available. Windows-related C code
175-
# should probably be rechecked and fixed at some point.
176-
check_type_size("intmax_t" SIZEOF_INTMAX_T)
177-
if(SIZEOF_INTMAX_T STREQUAL "" OR CMAKE_SYSTEM_NAME STREQUAL "Windows")
173+
# The intmax_t is always available by C99 standard and its size varies between
174+
# 32-bit and 64-bit target platforms. PHP on Windows sets SIZEOF_INTMAX_T to 0,
175+
# otherwise the type and its size are available on Windows.
176+
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
178177
set(SIZEOF_INTMAX_T_CODE "#define SIZEOF_INTMAX_T 0")
178+
else()
179+
check_type_size("intmax_t" SIZEOF_INTMAX_T)
179180
endif()
180181

181182
check_type_size("long" SIZEOF_LONG)
@@ -193,26 +194,6 @@ if(SIZEOF_OFF_T STREQUAL "")
193194
set(SIZEOF_OFF_T_CODE "#define SIZEOF_OFF_T 0")
194195
endif()
195196

196-
# TODO: The ptrdiff_t is always available by C89 standard and its size varies
197-
# between 32-bit and 64-bit target platforms. Checking whether the ptrdiff_t
198-
# exists is redundant and is left here as PHP still checks it conditionally in
199-
# the intl extension.
200-
check_type_size("ptrdiff_t" SIZEOF_PTRDIFF_T)
201-
if(SIZEOF_PTRDIFF_T STREQUAL "")
202-
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
203-
set(SIZEOF_PTRDIFF_T 4)
204-
else()
205-
set(SIZEOF_PTRDIFF_T 8)
206-
endif()
207-
set(SIZEOF_PTRDIFF_T_CODE "#define SIZEOF_PTRDIFF_T ${SIZEOF_PTRDIFF_T}")
208-
209-
message(
210-
WARNING
211-
"Couldn't determine the ptrdiff_t size, setting it to ${SIZEOF_PTRDIFF_T}."
212-
)
213-
endif()
214-
set(HAVE_PTRDIFF_T TRUE)
215-
216197
check_type_size("size_t" SIZEOF_SIZE_T)
217198
if(SIZEOF_SIZE_T STREQUAL "")
218199
set(SIZEOF_SIZE_T_CODE "#define SIZEOF_SIZE_T 0")

cmake/main/cmake/php_config.h.in

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,6 @@
294294
/* Define to 1 if you have the 'pthread_jit_write_protect_np' function. */
295295
#cmakedefine HAVE_PTHREAD_JIT_WRITE_PROTECT_NP 1
296296

297-
/* Define to 1 if the system has the type 'ptrdiff_t'. */
298-
#cmakedefine HAVE_PTRDIFF_T 1
299-
300297
/* Define to 1 if you have the <pty.h> header file. */
301298
#cmakedefine HAVE_PTY_H 1
302299

@@ -629,9 +626,6 @@
629626
/* The size of 'off_t', as computed by sizeof. */
630627
@SIZEOF_OFF_T_CODE@
631628

632-
/* The size of 'ptrdiff_t', as computed by sizeof. */
633-
@SIZEOF_PTRDIFF_T_CODE@
634-
635629
/* The size of 'size_t', as computed by sizeof. */
636630
@SIZEOF_SIZE_T_CODE@
637631

docs/evolution.md

Lines changed: 11 additions & 3 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_PTRDIFF_T` preprocessor macro has been removed.
947948
948949
#### Autotools
949950
@@ -957,9 +958,13 @@ PHP coding standards now use the C11 standard.
957958
`--with-libdir` configure options (e.g.,
958959
`--libdir=/usr/lib64 --with-libdir=lib64` will set `libdir` to
959960
`/usr/lib64/php`).
960-
* `PHP_ODBC_CFLAGS`, `PHP_ODBC_LFLAGS`, `PHP_ODBC_LIBS`, `PHP_ODBC_TYPE`
961+
962+
##### Changes to main/php_config.h
963+
964+
* The `PHP_ODBC_CFLAGS`, `PHP_ODBC_LFLAGS`, `PHP_ODBC_LIBS`, and `PHP_ODBC_TYPE`
961965
preprocessor macros defined by ext/odbc are now defined in `php_config.h`
962966
instead of the `build-defs.h` header.
967+
* The `HAVE_PTRDIFF_T` preprocessor macro has been removed.
963968
964969
#### Windows
965970
@@ -971,8 +976,6 @@ PHP coding standards now use the C11 standard.
971976
`duplicate_sources` parameter. If truthy, no rules to build the object files
972977
are generated. This allows to build additional variants of SAPIs (e.g., a DLL
973978
and EXE) without duplicate build rules.
974-
* `HAVE_GETLOGIN` preprocessor macro removed from configuration header
975-
(`main/config.w32.h`).
976979
977980
##### Windows configure options
978981
@@ -982,4 +985,9 @@ PHP coding standards now use the C11 standard.
982985
* The `--with-uncritical-warn-choke` configuration option for Clang builds has
983986
been removed in favor of adding warning-suppressing flags via `CFLAGS`.
984987
988+
##### Changes to main/config.w32.h
989+
990+
* The `HAVE_GETLOGIN` preprocessor macro has been removed from configuration
991+
header (`main/config.w32.h`).
992+
985993
</details>

0 commit comments

Comments
 (0)