Merge changes from gnulib for file system sub-second time stamps.

* configure.ac: Remove checks for struct stat.st_spare1, struct
stat.st_atim.tv_nsec, struct stat.st_atimespec.tv_nsec, struct
stat.st_atimensec, as gnulib now does this for us.
Similarly for LIB_CLOCK_GETTIME.
* gnulib.modules: Add stat-time.
* lib/.cvsignore: Add stat-time.h.
* src/common.h: Include stat-time.h.
(timespec_lt): Remove.  All callers changed to use timespec_cmp.
(get_stat_atime, get_stat_ctime, get_stat_mtime):
(set_stat_atime, set_stat_ctime, set_stat_mtime):
Remove; now defined by stat-time.h.
This commit is contained in:
Paul Eggert
2005-09-16 07:03:44 +00:00
parent ae5473fe02
commit 2f800ce3fb
6 changed files with 21 additions and 149 deletions

View File

@@ -200,11 +200,11 @@ check_time (char const *file_name, struct timespec t)
if (t.tv_sec <= 0)
WARN ((0, 0, _("%s: implausibly old time stamp %s"),
file_name, tartime (t, true)));
else if (timespec_lt (start_time, t))
else if (timespec_cmp (start_time, t) < 0)
{
struct timespec now;
gettime (&now);
if (timespec_lt (now, t))
if (timespec_cmp (now, t) < 0)
{
unsigned long int ds = t.tv_sec - now.tv_sec;
int dns = t.tv_nsec - now.tv_nsec;