[bug#59994] [PATCH] tests: Don't try to prevent flex to include unistd.h
Zack Weinberg <[email protected]>
| Newsgroups | gmane.comp.sysutils.automake.patches |
|---|---|
| Message-ID | <[email protected]> |
On 2022-12-12 2:07 AM, Frederic Berat wrote: > > This patch is mainly a proposal. While the macro can simply be removed > as explained below, another possibility it to add a flex option > "--never-interactive" to prevent flex to make use of "isatty". > > This is related to an effort to prepare Automake for future GCC/Clang > versions which set c99 as default standard to be used. > > Future version of flex make the "NO_UNISTD" flag a no-op, and include > unistd.h by default. > > In current version of flex, not having this header leads to implicit > function declarations that are not compatible with c99 standard. > > On top of that, while flex dedicated test were having this macro set, > the yacc ones didn't have it despise their use of Flex. Thus, if this > macro was ever useful, it looks like nobody actually cared. I'm guessing that the idea here was to avoid using unistd.h on platforms that don't supply that header at all. I suggest that we should apply your patch *and* consistently test flex with "--never-interactive". zw