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

Previous Next

Package: automake-patches;

Reported by: Frederic Berat <fberat <at> redhat.com>

Date: Mon, 12 Dec 2022 08:44:06 UTC

Severity: normal

Tags: patch

Done: Karl Berry <karl <at> freefriends.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Zack Weinberg" <zack <at> owlfolio.org>
To: 59994 <at> debbugs.gnu.org
Subject: [bug#59994] [PATCH] tests: Don't try to prevent flex to include unistd.h
Date: Sat, 14 Jan 2023 11:15:46 -0500
On Fri, Jan 13, 2023, at 6:33 PM, Karl Berry wrote:
>> your patch *and* consistently test flex with "--never-interactive".
>
> Making flex non-interactive sounds desirable in any case, but
> --never-interactive is not mentioned in the 2.6.0 --help message.
> Instead there is -B (--batch), although --never-interactive is
> recognized, I can see experimentally.

--never-interactive is documented in the Texinfo manual ("Options
Affecting Scanner Behavior" node).  It looks to me like the --help
output intentionally lists only the most commonly used options.

--never-interactive and --batch are technically orthogonal.  I don't
know any reason a *real* scanner would want to use --never-interactive
*without* --batch.  However, to address the specific problem with *test*
scanners we are discussing here, --never-interactive is what we want,
because --never-interactive is the option that makes the generated code
not call isatty().

> I do not know when --never-interactive, or any of its variants, was
> implemented. We should check that before using it ...

I'm pleasantly surprised to report that the Git repo for flex at
<https://github.com/westes/flex> has history going back all the way
to 1987.

The *feature* of optionally not calling isatty() on the input file
has been present since version 2.5.1 (released 1995-03-28), in the
form of `%option {always,never}-interactive` directives inside the
scanner.  The *command line option* --never-interactive was added
in version 2.5.6 (along with long command line options in general).
That version was released somewhere between 2002-04-19 and 2002-04-23;
the exact date is not recorded anywhere I can find.

zw




This bug report was last modified 1 year and 139 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.