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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user