1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 02:33:17 +02:00

Replace HAVE_ST_BLOCKS with HAVE_STRUCT_STAT_ST_BLOCKS

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.
This commit is contained in:
Peter Kokot
2018-08-24 00:33:02 +02:00
committed by Christoph M. Becker
parent 6136a20544
commit 3ceecaa9a0
6 changed files with 6 additions and 6 deletions
+1 -1
View 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);
+1 -1
View 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);
+1 -1
View 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);
+1 -1
View 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
+1 -1
View 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
+1 -1
View 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