tests: fix a failure in Lex/C++ tests on Mac OS X
authorStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 26 Apr 2012 08:29:42 +0000 (10:29 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 26 Apr 2012 09:42:07 +0000 (11:42 +0200)
The <cstdio> header from Xcode-4.3.2 on Mac OS X 10.7.3 declares a 'isatty'
function with C++ linkage, that conflicts with our dummy definition of the
same function, which in turn is required to work around the absence of the
unistd.h header on MinGW (see commit 'v1.11-2138-gfeea090' of 11-04-2012).
So we tweak the affected tests to work around this new problem as well.

This fixes automake bug#11345.

* t/lex-clean-cxx.sh ($required): Since we are at it, add an explicit
'c++' requirement.
* t/lex-depend-cxx.sh ($required): Likewise.
(my-hdr.hxx): Don't include <cstdio>.  The "using namespace" directive
should still be enough to ensure the content of this header is not valid
C, albeit being of course valid C++.
Fix unrelated typos in comments.
(joe.ll): Adjust, by removing the call to 'printf'.
* THANKS: Add entry for reporter "Adam Mercer".

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
THANKS
t/lex-clean-cxx.sh
t/lex-depend-cxx.sh

diff --git a/THANKS b/THANKS
index 16367e1..c8e4012 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -3,6 +3,7 @@ It would not be what it is today without the invaluable help of these
 people:
 
 Adam J. Richter                adam@yggdrasil.com
+Adam Mercer            ramercer@gmail.com
 Adam Sampson           ats@offog.org
 Adrian Bunk            bunk@fs.tum.de
 Akim Demaille          akim@freefriends.org
index 1c57524..d1a745b 100755 (executable)
@@ -20,7 +20,7 @@
 # "make maintainer-clean".
 # See also sister test 'lex-clean.test'.
 
-required=lex
+required='c++ lex'
 . ./defs || Exit 1
 
 cat >> configure.ac << 'END'
index 490516f..7bdfdf9 100755 (executable)
@@ -17,7 +17,7 @@
 # Test to make sure dependencies work with Lex/C++.
 # Test synthesized from PR automake/6.
 
-required=lex
+required='c++ lex'
 . ./defs || Exit 1
 
 cat >> configure.ac << 'END'
@@ -61,7 +61,6 @@ int yywrap (void)
 }
 int main (int argc, char **argv)
 {
-  printf("Hello, World!\n");
   return 0;
 }
 END
@@ -69,8 +68,7 @@ END
 cp joe.ll moe.l++
 
 cat > my-hdr.hxx <<'END'
-// This header contains deliberetly invalid C (but valid C++)
-#include <cstdio>
+// This header contains deliberately invalid C (but valid C++).
 using namespace std;
 END