From 2543f06b180e91371eb9e20c38d96142e0827fde Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Thu, 18 Oct 2012 17:47:46 +0200 Subject: [PATCH] tests: fix spurious failures with tcc * t/depcomp8a.sh, t/depcomp8b.sh: Here, by avoiding initialization of global 'extern' variables, preferring functions definitions instead. Signed-off-by: Stefano Lattarini --- t/depcomp8a.sh | 9 ++++++--- t/depcomp8b.sh | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/t/depcomp8a.sh b/t/depcomp8a.sh index 61ffa5692..3d58a3eeb 100755 --- a/t/depcomp8a.sh +++ b/t/depcomp8a.sh @@ -37,12 +37,15 @@ mkdir sub cat > foo.c << 'END' int main (void) { - extern int bar; - return bar; + extern int bar (void); + return bar (); } END cat > sub/bar.c << 'END' -extern int bar = 0; +int bar (void) +{ + return 0; +} END $ACLOCAL diff --git a/t/depcomp8b.sh b/t/depcomp8b.sh index a97e2c31a..6fed2155c 100755 --- a/t/depcomp8b.sh +++ b/t/depcomp8b.sh @@ -36,8 +36,8 @@ libzardoz_la_SOURCES = foo.c sub/bar.c END mkdir sub -echo 'extern int foo = 0;' > foo.c -echo 'extern int bar = 0;' > sub/bar.c +echo 'int foo (void) { return 0; }' > foo.c +echo 'int bar (void) { return 0; }' > sub/bar.c libtoolize -- 2.11.4.GIT