On 03/06/2012 08:45 AM, Peter Rosin wrote: > Peter Rosin skrev 2012-03-06 08:38: >> Stefano Lattarini skrev 2012-03-05 21:05: >> >>> I'd like to see a little addition squashed-in if you can: a new >>> entry in 'tests/README' explaining that a "#define YY_NO_UNISTD_H" >>> is needed in lex input files, and why it is so. >> >> Like this? > > No, that wasn't quite right, but perhaps like this? > Almost. Minor nits below.
> Cheers, > Peter > > diff --git a/tests/README b/tests/README > index 42afa2c..5f7be89 100644 > --- a/tests/README > +++ b/tests/README > @@ -263,6 +263,18 @@ Do > directory, but use '$am_scriptdir' instead. The complete list of > such "$am_...dir" variables can be found in tests/defs-static.in. > > + When writing input for lex, include the following in the definitions > + section > s/$/:/ here maybe? > + %{ > + #define YY_NO_UNISTD_H 1 > + %} > + to accomodate non-ANSI systems, since GNU flex generates code that > + includes unistd.h otherwise. Also add > Ditto. > + %option never-interactive > + to the definitions section if the generated code is to be compiled > + by a C++ compiler, since the isatty(3) function from that same > + unistd.h header is required otherwise. > + I'd tweak this as follows, which reads marginally better to me: ... if the generated code is to be compiled by a C++ compiler, for similar reasons (i.e., the isatty(3) function from that same unistd.h header would be required otherwise). ACK with or without those nits addressed (as they are mostly a matter of taste). Thanks, Stefano