diff options
author | Peter Kokot <petk@php.net> | 2018-07-29 13:12:33 +0200 |
---|---|---|
committer | Peter Kokot <peterkokot@gmail.com> | 2018-07-29 13:59:40 +0200 |
commit | d2184efb7be1b3bfb355e4a6e671ceacc3896eeb (patch) | |
tree | 0b241432aacd67a34c016f440e158d112e5c51e4 /ext/standard/file.c | |
parent | d7ad4babe0f3d1d050b7acbdb2b43794653de47f (diff) | |
download | php-git-d2184efb7be1b3bfb355e4a6e671ceacc3896eeb.tar.gz |
Replace obsolete AC_STRUCT_ST_BLKSIZE and AC_STRUCT_ST_RDEV
Autoconf 2.50 released in 2001 has made several macros obsolete. Instead
of the AC_STRUCT_ST_BLKSIZE and AC_STRUCT_ST_RDEV the new
AC_CHECK_MEMBERS should be used.
When checking for the presence of stat struct members st_blkzize and
st_rdev the new AC_CHECK_MEMBERS macro defines new constants
HAVE_STRUCT_STAT_ST_BLKSIZE and HAVE_STRUCT_STAT_ST_RDEV.
Old constants HAVE_ST_BLKSIZE and HAVE_ST_RDEV need to be replaced
respectively in PHP code (this patch) and in PHP extenstions if they use
them.
PHP 5.4 to 7.1 require Autoconf 2.59+ version, PHP 7.2 and above require
2.64+ version, and the PHP 7.2 phpize script requires 2.59+ version which
are all greater than above mentioned 2.50 version.
Diffstat (limited to 'ext/standard/file.c')
-rw-r--r-- | ext/standard/file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/standard/file.c b/ext/standard/file.c index 7596f0e18f..3304c64308 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -1590,7 +1590,7 @@ PHP_NAMED_FUNCTION(php_if_fstat) ZVAL_LONG(&stat_nlink, stat_ssb.sb.st_nlink); ZVAL_LONG(&stat_uid, stat_ssb.sb.st_uid); ZVAL_LONG(&stat_gid, stat_ssb.sb.st_gid); -#ifdef HAVE_ST_RDEV +#ifdef HAVE_STRUCT_STAT_ST_RDEV # ifdef PHP_WIN32 /* It is unsigned, so if a negative came from userspace, it'll convert to UINT_MAX, but we wan't to keep the userspace value. @@ -1611,7 +1611,7 @@ PHP_NAMED_FUNCTION(php_if_fstat) ZVAL_LONG(&stat_atime, stat_ssb.sb.st_atime); ZVAL_LONG(&stat_mtime, stat_ssb.sb.st_mtime); ZVAL_LONG(&stat_ctime, stat_ssb.sb.st_ctime); -#ifdef HAVE_ST_BLKSIZE +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE ZVAL_LONG(&stat_blksize, stat_ssb.sb.st_blksize); #else ZVAL_LONG(&stat_blksize,-1); |