Skip to content

Conversation

petk
Copy link
Member

@petk petk commented Jul 1, 2025

The ssize_t type is already used unconditionally in php-src code everywhere except the main/s{n,p}printf.c files. On Windows ssize_t is available as an alias to the SSIZE_T defined in BaseTsd.h (available in affected files through the included windows.h in zend_config.w32.h).

This also makes the Autoconf macro PHP_CHECK_SIZEOF obsolete in favor of the AC_CHECK_SIZEOF, which is more convenient to check for types without the need to run the test program - omitting the cross-compilation issues. AC_CHECK_SIZEOF once didn't provide including additional headers (resolved in Autoconf versions after 2.13).

The ssize_t type is already used unconditionally in php-src code
everywhere except the main/s{n,p}printf.c files. On Windows ssize_t is
available as an alias to the SSIZE_T defined in BaseTsd.h (available in
affected files through the included windows.h in zend_config.w32.h).

This also makes the Autoconf macro PHP_CHECK_SIZEOF obsolete in favor of
the AC_CHECK_SIZEOF, which is more convenient to check for types without
the need to run the test program - omitting the cross-compilation
issues. AC_CHECK_SIZEOF once didn't provide including additional headers
(resolved in Autoconf versions after 2.13).
@petk petk merged commit 8a75b3c into php:master Jul 1, 2025
9 checks passed
@petk petk deleted the patch-ssize-t branch July 1, 2025 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants