summaryrefslogtreecommitdiff
path: root/remake.c
diff options
context:
space:
mode:
Diffstat (limited to 'remake.c')
-rw-r--r--remake.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/remake.c b/remake.c
index 0f9f2aa..2fd85e8 100644
--- a/remake.c
+++ b/remake.c
@@ -396,14 +396,15 @@ update_file_1 (file, depth)
noexist = this_mtime == NONEXISTENT_MTIME;
if (noexist)
DBF (DB_BASIC, _("File `%s' does not exist.\n"));
- else
+ else if (ORDINARY_MTIME_MIN <= this_mtime && this_mtime <= ORDINARY_MTIME_MAX
+ && file->low_resolution_time)
{
-#ifndef NO_ARCHIVES
- /* Avoid spurious rebuilds of archive members due to their
- timestamp resolution being only one second. */
- if (1 < FILE_TIMESTAMPS_PER_S && ar_name (file->name))
- this_mtime += FILE_TIMESTAMPS_PER_S - 1;
-#endif
+ /* Avoid spurious rebuilds due to low resolution time stamps. */
+ int ns = FILE_TIMESTAMP_NS (this_mtime);
+ if (ns != 0)
+ error (NILF, _("*** Warning: .LOW_RESOLUTION_TIME file `%s' has a high resolution time stamp"),
+ file->name);
+ this_mtime += FILE_TIMESTAMPS_PER_S - 1 - ns;
}
must_make = noexist;
@@ -1106,6 +1107,8 @@ f_mtime (file, search)
free (arname);
free (memname);
+ file->low_resolution_time = 1;
+
if (mtime == NONEXISTENT_MTIME)
/* The archive doesn't exist, so its members don't exist either. */
return NONEXISTENT_MTIME;