]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
tests: avoid implicit function declaration in t/depcomp.sh.
authorFrédéric Bérat <fberat@redhat.com>
Mon, 28 Aug 2023 13:11:39 +0000 (06:11 -0700)
committerKarl Berry <karl@freefriends.org>
Mon, 28 Aug 2023 13:11:39 +0000 (06:11 -0700)
This patch is from https://bugs.gnu.org/60962.

* t/ax/depcomp.sh: save and restore sub/subfoo.h, so its
declaration will be seen, as required by C99.
* THANKS: add Frédéric.

THANKS
t/ax/depcomp.sh

diff --git a/THANKS b/THANKS
index 446c84e1b4526a2c321d2a93f403a3ae3e3379b0..1217d3c2a867cebd2bec2004caeff5c082d24c0f 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -138,6 +138,7 @@ Florian Briegel                 briegel@zone42.de
 Francesco Salvestrini           salvestrini@gmail.com
 François Pinard                 pinard@iro.umontreal.ca
 Fred Fish                       fnf@ninemoons.com
+Frédéric Bérat                fberat@redhat.com
 Ganesan Rajagopal               rganesan@novell.com
 Garrett D'Amore                 garrett@qualcomm.com
 Garth Corral                    garthc@inktomi.com
index 7a3ac63a77a989a0a64dd96b24bc21d6ab65ee4f..1d29673fef8368cd1e53639b922e18a151bf6d9c 100644 (file)
@@ -243,6 +243,8 @@ cat > sub/subfoo.h <<'END'
 #include <stdio.h>
 extern int subfoo (void);
 END
+# Save subfoo.h so we can restore it below; see #60962.
+cp sub/subfoo.h sub/subfoo.save
 
 cat > src/baz.c <<'END'
 #include "baz.h"
@@ -399,8 +401,7 @@ do_test ()
       && rewrite "$srcdir"/sub/subfoo.h echo 'choke me' \
       && not $MAKE \
       && delete "$srcdir"/sub/subfoo.h \
-      && edit "$srcdir"/sub/subfoo.c -e 1d \
-      && edit "$srcdir"/foo.h -e 2d \
+      && cp "$srcdir"/sub/subfoo.save "$srcdir"/sub/subfoo.h \
       && make_ok \
       || r='not ok'
     result_ "$r" "$pfx dependency tracking works"