Skip to content

Commit

Permalink
Replace HAVE_ST_BLOCKS with HAVE_STRUCT_STAT_ST_BLOCKS
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
petk authored and cmb69 committed Aug 24, 2018
1 parent 6136a20 commit 3ceecaa
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ext/phar/func_interceptors.c
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/file.c
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/filestat.c
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/ftp_fopen_wrapper.c
Expand Up @@ -877,7 +877,7 @@ static int php_stream_ftp_url_stat(php_stream_wrapper *wrapper, const char *url,
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
Expand Down
2 changes: 1 addition & 1 deletion main/streams/userspace.c
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion win32/build/config.w32.h.in
Expand Up @@ -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
Expand Down

0 comments on commit 3ceecaa

Please sign in to comment.