diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2010-09-14 13:17:37 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2010-09-14 13:17:58 -0700 |
commit | 60cc7709da5317fca021d9fe4e46a943e528acc8 (patch) | |
tree | 99639247c85c70711d921b77337a60c8be48accc /tests | |
parent | 3098be8a03bded997cfd3b43e92f1784eaeb4322 (diff) | |
download | paxutils-60cc7709da5317fca021d9fe4e46a943e528acc8.tar.gz |
paxutils: use POSIX interface for file time-setting
This is a minor cleanup to use the POSIX.1-2008 interface for
setting file time stamps to nanosecond resolution, rather than
the pre-2008 gnulib interface. On older hosts, it falls back
on gnulib's implementation of the POSIX interface.
* configure.ac: Don't check for utimes; it's not used.
* gnulib.modules: Add utimensat.
* tests/genfile.c: Don't include utimens.h.
(exec_checkpoint): Use POSIX utimensat function, not utimens.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/genfile.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/genfile.c b/tests/genfile.c index 19cbdcb..998e6a6 100644 --- a/tests/genfile.c +++ b/tests/genfile.c @@ -29,7 +29,6 @@ #include <argp.h> #include <argcv.h> #include <getdate.h> -#include <utimens.h> #include <inttostr.h> #include <fcntl.h> #include <sys/stat.h> @@ -656,7 +655,7 @@ exec_checkpoint (struct action *p) struct timespec ts[2]; ts[0] = ts[1] = p->ts; - if (utimens (p->name, ts) != 0) + if (utimensat (AT_FDCWD, p->name, ts, 0) != 0) { error (0, errno, _("cannot set time on `%s'"), p->name); break; |