From 7f713c38e4e1ad3c3cca73e6cd23d605ad7b886e Mon Sep 17 00:00:00 2001 From: Peter Rosin Date: Tue, 20 Dec 2011 21:42:54 +0100 Subject: [PATCH] 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). --- ChangeLog | 9 +++++++++ tests/silent-lex-generic.test | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index 9f9b3cc..49b6e8b 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 2b2183e..f1b1ce2 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; . -- 2.7.4