Skip to content

Commit 636516d

Browse files
committed
Check struct stat.st_blocks with AC_CHECK_MEMBERS
The AC_STRUCT_ST_BLOCKS expects fileblocks object to be compiled using AC_LIBOBJ in case stat.st_blocks is missing on some system. This can be simplified with the usual AC_CHECK_MEMBERS since PHP is using the stat.st_blocks (and stat.st_blksize) conditionally. This also removes the obsolete HAVE_ST_BLOCKS symbol. https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/types.m4?h=v2.72#n1055
1 parent a48ed12 commit 636516d

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

UPGRADING.INTERNALS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ PHP 8.4 INTERNALS UPGRADE NOTES
111111
- Symbol HAVE_BSD_ICONV has been removed.
112112
- Symbol ZEND_FIBER_ASM has been removed.
113113
- Symbols HAVE_DLOPEN and HAVE_DLSYM have been removed.
114+
- Symbol HAVE_ST_BLOCKS has been removed (use HAVE_STRUCT_STAT_ST_BLOCKS).
114115
- M4 macro PHP_DEFINE (atomic includes) removed (use AC_DEFINE and config.h).
115116
- M4 macro PHP_WITH_SHARED has been removed (use PHP_ARG_WITH).
116117
- M4 macro PHP_STRUCT_FLOCK has been removed (use AC_CHECK_TYPES).

configure.ac

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -535,11 +535,7 @@ fi
535535

536536
dnl Check for structure members.
537537
AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[#include <time.h>])
538-
AC_CHECK_MEMBERS([struct stat.st_blksize, struct stat.st_rdev])
539-
dnl AC_STRUCT_ST_BLOCKS will screw QNX because fileblocks.o does not exist.
540-
if test "`uname -s 2>/dev/null`" != "QNX"; then
541-
AC_STRUCT_ST_BLOCKS
542-
fi
538+
AC_CHECK_MEMBERS([struct stat.st_blksize, struct stat.st_blocks, struct stat.st_rdev])
543539

544540
dnl Checks for types.
545541
AC_TYPE_UID_T

0 commit comments

Comments
 (0)