automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#59994] [PATCH] tests: Don't try to prevent flex to include unistd.h


From: Zack Weinberg
Subject: [bug#59994] [PATCH] tests: Don't try to prevent flex to include unistd.h
Date: Mon, 12 Dec 2022 15:20:46 -0500
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]