Subject: bug#10324: [Platform-testers] Automake 1.11.1b test release

From: Stefano Lattarini <[email-masked]>
Date: Tue, 20 Dec 2011 21:30:34 +0100

Hi Peter, thanks for the patch.

On 12/20/2011 09:15 PM, Peter Rosin wrote:
> 
> How about this for maint? Caution, I'm pretty much ignorant of lex details...
>
Surely no more than I am, so I'll follow your lead.  I just have a couple of nits below.

> Cheers,
> Peter
> 
> 2011-12-20  Peter Rosin  <[email-masked]>
> 
> 	tests: fix spurious failure on systems lacking unistd.h
> 	* tests/silent-lex-generic.test (foo.l): Don't require unistd.h
> 	to be present.
>
Here, I'd report the bug number and the name of the affected system as well; something
like this:

	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 when compiling with, e.g., MSVC 9).

ACK with this addressed, if you can confirm your change fixes the spurious failure
(but I bet you've already checked that ;-)

> diff --git a/tests/silent-lex-generic.test b/tests/silent-lex-generic.test
> index 2b2183e..a1c19ea 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
>
Micro-nit: maybe define this to '1' for clarity & safeness?  (This is not a
requirement for an ACK though, just a matter of preference).

> +%}
>  %%
>  "END"   return EOF;
>  .

Thanks,
  Stefano