From: Peter Rosin Date: Tue, 20 Dec 2011 20:42:54 +0000 (+0100) Subject: tests: fix spurious failure on systems lacking unistd.h X-Git-Tag: v1.11.2~1^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f713c38e4e1ad3c3cca73e6cd23d605ad7b886e;p=thirdparty%2Fautomake.git tests: fix spurious failure on systems lacking unistd.h This is for automake bug#10324. * tests/silent-lex-generic.test (foo.l): Add a dummy #define of YY_NO_UNISTD_H, so that the generated foo.c file won't require unistd.h to be present (it is not present when compiling with, e.g., MSVC 9). --- diff --git a/ChangeLog b/ChangeLog index 9f9b3cc46..49b6e8bf9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2011-12-20 Peter Rosin + + tests: fix spurious failure on systems lacking unistd.h + This is for automake bug#10324. + * tests/silent-lex-generic.test (foo.l): Add a dummy #define of + YY_NO_UNISTD_H, so that the generated foo.c file won't require + unistd.h to be present (it is not present when compiling with, + e.g., MSVC 9). + 2011-12-16 Stefano Lattarini test defs: hack to support autoconf-wrapper programs diff --git a/tests/silent-lex-generic.test b/tests/silent-lex-generic.test index 2b2183e07..f1b1ce2ca 100755 --- a/tests/silent-lex-generic.test +++ b/tests/silent-lex-generic.test @@ -53,6 +53,10 @@ LDADD = $(LEXLIB) EOF cat > foo.l <<'EOF' +%{ +/* avoid non-ANSI #include of unistd.h */ +#define YY_NO_UNISTD_H 1 +%} %% "END" return EOF; .