]> git.ipfire.org Git - thirdparty/make.git/commitdiff
* src/filedef.h (is_ordinary_mtime): Check for "ordinary" mod time.
authorPaul Smith <psmith@gnu.org>
Sat, 1 Oct 2022 21:17:26 +0000 (17:17 -0400)
committerPaul Smith <psmith@gnu.org>
Sun, 2 Oct 2022 12:55:29 +0000 (08:55 -0400)
* src/remake.c (update_file_1): Use the new macro.

src/filedef.h
src/remake.c

index 304a07f666768ffab87f9ed14a8c1fc67e8be12d..ac7df0083a31149172e943cce47d4adc1414fb3b 100644 (file)
@@ -212,6 +212,8 @@ FILE_TIMESTAMP f_mtime (struct file *file, int search);
                              << FILE_TIMESTAMP_LO_BITS) \
                             + ORDINARY_MTIME_MIN + FILE_TIMESTAMPS_PER_S - 1)
 
+#define is_ordinary_mtime(_t) ((_t) >= ORDINARY_MTIME_MIN && (_t) <= ORDINARY_MTIME_MAX)
+
 /* Modtime value to use for 'infinitely new'.  We used to get the current time
    from the system and use that whenever we wanted 'new'.  But that causes
    trouble when the machine running make and the machine holding a file have
index 69a0e6cbe2f9a856517d1d0035f8aa8c7cfa8077..a97431b9e0c5963d341bf49eae4b7f62670dee1c 100644 (file)
@@ -491,8 +491,7 @@ update_file_1 (struct file *file, unsigned int depth)
   noexist = this_mtime == NONEXISTENT_MTIME;
   if (noexist)
     DBF (DB_BASIC, _("File '%s' does not exist.\n"));
-  else if (ORDINARY_MTIME_MIN <= this_mtime && this_mtime <= ORDINARY_MTIME_MAX
-           && file->low_resolution_time)
+  else if (is_ordinary_mtime (this_mtime) && file->low_resolution_time)
     {
       /* Avoid spurious rebuilds due to low resolution time stamps.  */
       int ns = FILE_TIMESTAMP_NS (this_mtime);