tests: fix spurious failure on systems lacking unistd.h
authorPeter Rosin <peda@lysator.liu.se>
Tue, 20 Dec 2011 20:42:54 +0000 (21:42 +0100)
committerPeter Rosin <peda@lysator.liu.se>
Tue, 20 Dec 2011 20:42:54 +0000 (21:42 +0100)
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
tests/silent-lex-generic.test

index 9f9b3cc..49b6e8b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-12-20  Peter Rosin  <peda@lysator.liu.se>
+
+       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  <stefano.lattarini@gmail.com>
 
        test defs: hack to support autoconf-wrapper programs
index 2b2183e..f1b1ce2 100755 (executable)
@@ -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;
 .