summaryrefslogtreecommitdiff
path: root/ext/session
diff options
context:
space:
mode:
authorPeter Kokot <peterkokot@gmail.com>2018-09-01 03:56:52 +0200
committerJoe Watkins <krakjoe@php.net>2018-09-04 12:03:34 +0200
commit29dc0470c826c58aaf784e0d1763c9dad3ee646e (patch)
treea16b55ce647e3fe54f5855930421a972c2351fd4 /ext/session
parent6db3c105f2937cb01ced82c3943ff41b5176315a (diff)
downloadphp-git-29dc0470c826c58aaf784e0d1763c9dad3ee646e.tar.gz
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
Diffstat (limited to 'ext/session')
-rw-r--r--ext/session/mod_files.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c
index cec67df148..2a5cf27068 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);