diff options
author | Paul Smith <psmith@gnu.org> | 2007-11-05 14:15:19 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2007-11-05 14:15:19 +0000 |
commit | 8025f93312d53e0edc77677fe3c99e6e3b965991 (patch) | |
tree | 15641572bcd28e4d7bc3b08a3bc837f3c4ae39ed /remake.c | |
parent | 43d81ff8669c3705ca3c61270af4a5c7218c2fe6 (diff) | |
download | gunmake-8025f93312d53e0edc77677fe3c99e6e3b965991.tar.gz |
For mod times farther in the future, print the value in fixed-point rather
than exponential notation (patch from Bruno Haible).
Diffstat (limited to 'remake.c')
-rw-r--r-- | remake.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -1302,8 +1302,14 @@ f_mtime (struct file *file, int search) (FILE_TIMESTAMP_S (mtime) - FILE_TIMESTAMP_S (now) + ((FILE_TIMESTAMP_NS (mtime) - FILE_TIMESTAMP_NS (now)) / 1e9)); - error (NILF, _("Warning: File `%s' has modification time %.2g s in the future"), - file->name, from_now); + char from_now_string[100]; + + if (from_now >= 99 && from_now <= ULONG_MAX) + sprintf (from_now_string, "%lu", (unsigned long) from_now); + else + sprintf (from_now_string, "%.2g", from_now); + error (NILF, _("Warning: File `%s' has modification time %s s in the future"), + file->name, from_now_string); #endif clock_skew_detected = 1; } |