com php-src: Remove AC_FUNC_UTIME_NULL: UPGRADING.I NTERNALS configure.ac ext/session/mod_files.c ext/s tandard/filestat.c win32/build/config.w32.h.i
n
| From: | Joe Watkins | Date: | Tue, 04 Sep 2018 10:03:34 +0000 |
| Subject: | com php-src: Remove AC_FUNC_UTIME_NULL: UPGRADING.I NTERNALS configure.ac ext/session/mod_files.c ext/s tandard/filestat.c win32/build/config.w32.h.i n |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-103000@lists.php.net to get a copy of this message | ||
Commit: 29dc0470c826c58aaf784e0d1763c9dad3ee646e
Author: Peter Kokot <peterkokot@gmail.com> Sat, 1 Sep 2018 03:56:52 +0200
Committer: Joe Watkins <krakjoe@php.net> Tue, 4 Sep 2018 12:03:34 +0200
Parents: 6db3c105f2937cb01ced82c3943ff41b5176315a
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=29dc0470c826c58aaf784e0d1763c9dad3ee646e
Log:
Remove AC_FUNC_UTIME_NULL
Autoconf 2.59d (released in 2006) [1] started promoting several macros
as not relevant for newer systems, including the AC_FUNC_UTIME_NULL.
This macro checks if
utime(file, NULL) sets file's timestamp to the
current time and defines the HAVE_UTIME_NULL symbol. This check was
relevant on very old systems (for example, 4.3BSD released in 1986) and
today can be omitted for systems with utime since it should be well
supported by now. [2]
Refs:
[1] http://git.savannah.gnu.org/cgit/autoconf.git/tree/NEWS
[2] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html
Changed paths:
M UPGRADING.INTERNALS
M configure.ac
M ext/session/mod_files.c
M ext/standard/filestat.c
M win32/build/config.w32.h.in
Diff:
diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS
index af5a36b..9981b56 100644
--- a/UPGRADING.INTERNALS
+++ b/UPGRADING.INTERNALS
@@ -29,8 +29,9 @@ PHP 7.4 INTERNALS UPGRADE NOTES
a. Unix build system changes
- configure --help now also outputs --program-suffix and --program-prefix
information by using the Autoconf AC_ARG_PROGRAM macro.
- - Obsolescent macro AC_FUNC_VPRINTF has been removed and the HAVE_VPRINTF
- symbol is no longer defined since it is not needed on current systems.
+ - Obsolescent macros AC_FUNC_VPRINTF and AC_FUNC_UTIME_NULL have been
+ removed. Symbols HAVE_VPRINTF and HAVE_UTIME_NULL are no longer defined
+ since they are not needed on the current systems.
b. Windows build system changes
diff --git a/configure.ac b/configure.ac
index 06ae3f4..2ad2190 100644
--- a/configure.ac
+++ b/configure.ac
@@ -738,7 +738,6 @@ if test "$ac_cv_func_sync_fetch_and_add" = yes; then
fi
AC_REPLACE_FUNCS(strlcat strlcpy explicit_bzero getopt)
-AC_FUNC_UTIME_NULL
AC_FUNC_ALLOCA
dnl PHP_AC_BROKEN_SPRINTF
dnl PHP_AC_BROKEN_SNPRINTF
diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c
index cec67df..2a5cf27 100644
--- a/ext/session/mod_files.c
+++ b/ext/session/mod_files.c
@@ -571,8 +571,6 @@ PS_WRITE_FUNC(files)
PS_UPDATE_TIMESTAMP_FUNC(files)
{
char buf[MAXPATHLEN];
- struct utimbuf newtimebuf;
- struct utimbuf *newtime = &newtimebuf;
int ret;
PS_FILES_DATA;
@@ -581,12 +579,7 @@ PS_UPDATE_TIMESTAMP_FUNC(files)
}
/* Update mtime */
-#ifdef HAVE_UTIME_NULL
- newtime = NULL;
-#else
- newtime->modtime = newtime->actime = time(NULL);
-#endif
- ret = VCWD_UTIME(buf, newtime);
+ ret = VCWD_UTIME(buf, NULL);
if (ret == -1) {
/* New session ID, create data file */
return ps_files_write(data, key, val);
diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c
index 6822e05..3a3c024 100644
--- a/ext/standard/filestat.c
+++ b/ext/standard/filestat.c
@@ -640,11 +640,7 @@ PHP_FUNCTION(touch)
switch (argc) {
case 1:
-#ifdef HAVE_UTIME_NULL
newtime = NULL;
-#else
- newtime->modtime = newtime->actime = time(NULL);
-#endif
break;
case 2:
newtime->modtime = newtime->actime = filetime;
diff --git a/win32/build/config.w32.h.in b/win32/build/config.w32.h.in
index 92d27dd..4a510ea 100644
--- a/win32/build/config.w32.h.in
+++ b/win32/build/config.w32.h.in
@@ -69,7 +69,6 @@
#undef HAVE_STRUCT_STAT_ST_BLKSIZE
#undef HAVE_STRUCT_STAT_ST_BLOCKS
#define HAVE_STRUCT_STAT_ST_RDEV 1
-#define HAVE_UTIME_NULL 1
#define STDC_HEADERS 1
#define REGEX 1
#define HSREGEX 1