summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/autoconf/autoconf/backports/0006-Fix-timing-bug-on-high-speed-builds.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/autoconf/autoconf/backports/0006-Fix-timing-bug-on-high-speed-builds.patch')
-rw-r--r--meta/recipes-devtools/autoconf/autoconf/backports/0006-Fix-timing-bug-on-high-speed-builds.patch75
1 files changed, 0 insertions, 75 deletions
diff --git a/meta/recipes-devtools/autoconf/autoconf/backports/0006-Fix-timing-bug-on-high-speed-builds.patch b/meta/recipes-devtools/autoconf/autoconf/backports/0006-Fix-timing-bug-on-high-speed-builds.patch
deleted file mode 100644
index 53fb40b4df..0000000000
--- a/meta/recipes-devtools/autoconf/autoconf/backports/0006-Fix-timing-bug-on-high-speed-builds.patch
+++ /dev/null
@@ -1,75 +0,0 @@
1From 713d9822bbfb2923115065efaefed34a0113f8a1 Mon Sep 17 00:00:00 2001
2From: Paul Eggert <eggert@cs.ucla.edu>
3Date: Sat, 1 Apr 2023 16:44:03 -0700
4Subject: [PATCH 06/29] Fix timing bug on high-speed builds
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Problem reported by Bogdan via Jacob Bachmeyer in:
10https://lists.gnu.org/r/autoconf/2023-04/msg00002.html
11* bin/autom4te.in: If a file timestamp equals a dependency’s
12timestamp, consider the file to be out of date. Although this may
13result in extra work, it fixes some rare timing bugs.
14
15Upstream-Status: Backport
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17---
18 bin/autom4te.in | 12 +++++-------
19 1 file changed, 5 insertions(+), 7 deletions(-)
20
21diff --git a/bin/autom4te.in b/bin/autom4te.in
22index 4b61f0a82..71d7e6a62 100644
23--- a/bin/autom4te.in
24+++ b/bin/autom4te.in
25@@ -910,10 +910,8 @@ sub up_to_date ($)
26 return 0
27 if ! -f $tfile || ! -f $ofile;
28
29- # The youngest of the cache files must be older than the oldest of
30+ # The younger of the cache files must be older than the oldest of
31 # the dependencies.
32- # FIXME: These timestamps have only 1-second resolution.
33- # Time::HiRes fixes this, but assumes Perl 5.8 or later.
34 my $tmtime = mtime ($tfile);
35 my $omtime = mtime ($ofile);
36 my ($file, $mtime) = ($tmtime < $omtime
37@@ -926,7 +924,7 @@ sub up_to_date ($)
38 # We depend at least upon the arguments.
39 foreach my $dep (@ARGV)
40 {
41- if ($mtime < mtime ($dep))
42+ if ($mtime <= mtime ($dep))
43 {
44 verb "up_to_date ($file): outdated: $dep";
45 return 0;
46@@ -949,7 +947,7 @@ sub up_to_date ($)
47 # timestamp of that missing file was newer).
48 return 0
49 if ! $dep;
50- if ($mtime < mtime ($dep))
51+ if ($mtime <= mtime ($dep))
52 {
53 verb "up_to_date ($file): outdated: $dep";
54 return 0;
55@@ -1038,7 +1036,7 @@ $icache_file = new Autom4te::XFile $icache, O_RDWR|O_CREAT;
56 $icache_file->lock (LOCK_EX)
57 if ($flock_implemented eq "yes");
58
59-# Read the cache index if available and older than autom4te itself.
60+# Read the cache index if available and younger than autom4te itself.
61 # If autom4te is younger, then some structures such as C4che might
62 # have changed, which would corrupt its processing.
63 Autom4te::C4che->load ($icache_file)
64@@ -1105,7 +1103,7 @@ else
65 # Actual M4 expansion, if the user wants it, or if $output is old
66 # (STDOUT is pretty old).
67 handle_output ($req, $output)
68- if $force || mtime ($output) < mtime ($ocache . $req->id);
69+ if $force || mtime ($output) <= mtime ($ocache . $req->id);
70 }
71
72 # If we ran up to here, the cache is valid.
73--
742.41.0
75