GNU bug report logs -
#61240
improve high-res file timestamp in Automake
Previous Next
Reported by: Paul Eggert <eggert <at> cs.ucla.edu>
Date: Thu, 2 Feb 2023 22:26:02 UTC
Severity: normal
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
Message #43 received at 61240 <at> debbugs.gnu.org (full text, mbox):
Paul Eggert wrote:
> On 2023-02-05 21:43, Jacob Bachmeyer wrote:
>> Should the patch be relative to commit
>> 6d6fc91c472fd84bd71a1b012fa9ab77bd94efea (before the version
>> requirement bump) or should it include reverting commit
>> 4e3744a15c4d8bdb46c11ead2fb56c5f591b714b (the version requirement bump)?
>
> Might as well do it all at once, thanks.
This second patch is the change I previously suggested. As noted in the
patch, please use my gnu.org address for public attribution. (I would
prefer to minimize any indirect advertising of GMail.)
I have found no better ChangeLog entry than the commit message:
* lib/Automake/FileUtils.pm: Gracefully degrade if Time::HiRes is
not available.
8<------
From: Jacob Bachmeyer <jcb <at> gnu.org>
Date: Tue, 7 Feb 2023 22:42:59 -0600
Subject: [PATCH 2/2] Gracefully degrade if Time::HiRes is not available
---
lib/Automake/FileUtils.pm | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/lib/Automake/FileUtils.pm b/lib/Automake/FileUtils.pm
index 697ff7e..8d0b368 100644
--- a/lib/Automake/FileUtils.pm
+++ b/lib/Automake/FileUtils.pm
@@ -39,9 +39,12 @@ use strict;
use warnings FATAL => 'all';
use Exporter;
-use Time::HiRes qw(stat);
use IO::File;
+# use sub-second resolution timestamps if available,
+# carry on with one-second resolution timestamps if that is all we have
+BEGIN { eval { require Time::HiRes; import Time::HiRes qw(stat) } }
+
use Automake::Channels;
use Automake::ChannelDefs;
--
8<------
-- Jacob
This bug report was last modified 2 years and 58 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.