automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[FYI] {master} tests: avoid spurious failures in tests on C++ and lex


From: Stefano Lattarini
Subject: [FYI] {master} tests: avoid spurious failures in tests on C++ and lex
Date: Wed, 11 Apr 2012 16:09:27 +0200

This is a follow-up to commit v1.11-2128-g7f2bc63 of 09-04-2012,
"tests: avoid spurious failures with non-flex 'lex' programs and
C++".  It is required to avoid a couple of spurious failures on
Solaris and NetBSD systems (at least).  See also automake bug#11185.

* t/lex-clean-cxx.sh (parsefoo.lxx): Do not declared the provided
dummy 'isatty' function as 'static', since that might conflict with
a declaration of it as 'extern' pulled in through other system
* t/lex-depend-cxx.sh (joe.ll): Likewise.
* t/README: Update advice, to avoid similar issues in the future.

Signed-off-by: Stefano Lattarini <address@hidden>
---
 t/README            |    2 +-
 t/lex-clean-cxx.sh  |    2 +-
 t/lex-depend-cxx.sh |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/t/README b/t/README
index 06ead74..75dae9e 100644
--- a/t/README
+++ b/t/README
@@ -260,7 +260,7 @@ Do
     %}
   to accommodate non-ANSI systems, since GNU flex generates code that
   includes unistd.h otherwise.  Also add:
-    static int isatty (int fd) { return 0; }
+    int isatty (int fd) { return 0; }
   to the definitions section if the generated code is to be compiled
   by a C++ compiler, for similar reasons (i.e., the isatty(3) function
   from that same unistd.h header would be required otherwise).
diff --git a/t/lex-clean-cxx.sh b/t/lex-clean-cxx.sh
index 4089f0e..1c57524 100755
--- a/t/lex-clean-cxx.sh
+++ b/t/lex-clean-cxx.sh
@@ -55,7 +55,7 @@ END
 cat > parsefoo.lxx << 'END'
 %{
 #define YY_NO_UNISTD_H 1
-static int isatty (int fd) { return 0; }
+int isatty (int fd) { return 0; }
 %}
 %%
 "GOOD"   return EOF;
diff --git a/t/lex-depend-cxx.sh b/t/lex-depend-cxx.sh
index 8e7a239..490516f 100755
--- a/t/lex-depend-cxx.sh
+++ b/t/lex-depend-cxx.sh
@@ -48,7 +48,7 @@ END
 cat > joe.ll << 'END'
 %{
 #define YY_NO_UNISTD_H 1
-static int isatty (int fd) { return 0; }
+int isatty (int fd) { return 0; }
 %}
 %%
 "foo" return EOF;
-- 
1.7.9




reply via email to

[Prev in Thread] Current Thread [Next in Thread]