]> granicus.if.org Git - php/commitdiff
Replace HAVE_ST_BLOCKS with HAVE_STRUCT_STAT_ST_BLOCKS
authorPeter Kokot <peterkokot@gmail.com>
Thu, 23 Aug 2018 22:33:02 +0000 (00:33 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Fri, 24 Aug 2018 16:33:23 +0000 (18:33 +0200)
Since Autoconf 2.50+ macro AC_STRUCT_ST_BLOCKS defines the new
HAVE_STRUCT_STAT_ST_BLOCKS symbol and has deprecated the previous
HAVE_ST_BLOCKS.

PHP 5.3 required Autoconf 2.13 (released in 1999) or newer, since PHP
5.4 the autoconf 2.59 (released in 2003) or newer was required, and
since PHP 7.2, autoconf 2.64 (released in 2008) or newer is required.

ext/phar/func_interceptors.c
ext/standard/file.c
ext/standard/filestat.c
ext/standard/ftp_fopen_wrapper.c
main/streams/userspace.c
win32/build/config.w32.h.in

index d9d8b0483687697326c52c5bb8349dcf5773777e..eb6dff8d27dd0ee541616c250f33daa9daa0c6e0 100644 (file)
@@ -540,7 +540,7 @@ static void phar_fancy_stat(zend_stat_t *stat_sb, int type, zval *return_value)
 #else
                ZVAL_LONG(&stat_blksize,-1);
 #endif
-#ifdef HAVE_ST_BLOCKS
+#ifdef HAVE_STRUCT_STAT_ST_BLOCKS
                ZVAL_LONG(&stat_blocks, stat_sb->st_blocks);
 #else
                ZVAL_LONG(&stat_blocks,-1);
index ef2234dba7b8b1af995b12fda89533b55a53ef63..4aae5022322b866c960c2cf9b84226afdde86a29 100644 (file)
@@ -1616,7 +1616,7 @@ PHP_NAMED_FUNCTION(php_if_fstat)
 #else
        ZVAL_LONG(&stat_blksize,-1);
 #endif
-#ifdef HAVE_ST_BLOCKS
+#ifdef HAVE_STRUCT_STAT_ST_BLOCKS
        ZVAL_LONG(&stat_blocks, stat_ssb.sb.st_blocks);
 #else
        ZVAL_LONG(&stat_blocks,-1);
index 220b593bfda58504b64c0a0752a97469176ecd0b..68644ac03c549a31f8eb06b4ab45d955461bde62 100644 (file)
@@ -948,7 +948,7 @@ PHPAPI void php_stat(const char *filename, size_t filename_length, int type, zva
 #else
                ZVAL_LONG(&stat_blksize,-1);
 #endif
-#ifdef HAVE_ST_BLOCKS
+#ifdef HAVE_STRUCT_STAT_ST_BLOCKS
                ZVAL_LONG(&stat_blocks, stat_sb->st_blocks);
 #else
                ZVAL_LONG(&stat_blocks,-1);
index 8628e9b106f74abac0f63605f3c15a02de3ab7c5..e9bedc2f2acd7481385c99a79c89b557525e013e 100644 (file)
@@ -877,7 +877,7 @@ mdtm_error:
        ssb->sb.st_rdev = -1;
 #ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
        ssb->sb.st_blksize = 4096;                              /* Guess since FTP won't expose this information */
-#ifdef HAVE_ST_BLOCKS
+#ifdef HAVE_STRUCT_STAT_ST_BLOCKS
        ssb->sb.st_blocks = (int)((4095 + ssb->sb.st_size) / ssb->sb.st_blksize); /* emulate ceil */
 #endif
 #endif
index e69db525dadf13f3e544aa05ff745d4f0e3a0a2c..5c144f28b30e36e6138d82514ac76d248594c6fc 100644 (file)
@@ -865,7 +865,7 @@ static int statbuf_from_array(zval *array, php_stream_statbuf *ssb)
 #ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
        STAT_PROP_ENTRY(blksize);
 #endif
-#ifdef HAVE_ST_BLOCKS
+#ifdef HAVE_STRUCT_STAT_ST_BLOCKS
        STAT_PROP_ENTRY(blocks);
 #endif
 
index ef72e6814daa512803fb76d54380bb399c092bd3..74342099c30a5006218a84d95c515b1698ec3e6c 100644 (file)
@@ -67,7 +67,7 @@
 #undef HAVE_SYS_TIME_H
 #define HAVE_SIGNAL_H 1
 #undef HAVE_STRUCT_STAT_ST_BLKSIZE
-#undef HAVE_ST_BLOCKS
+#undef HAVE_STRUCT_STAT_ST_BLOCKS
 #define HAVE_STRUCT_STAT_ST_RDEV 1
 #define HAVE_UTIME_NULL 1
 #define HAVE_VPRINTF 1