flex: Update to version 2.7.10

Message ID 20261127143322.3795112-7-adolf.belka@ipfire.org
State New
Headers
Series flex: Update to version 2.7.10 |

Commit Message

Adolf Belka 27 Nov 2026, 2:33 p.m. UTC
- Update from version 2.6.15 to 2.7.10
- No change in rootfile
- Changelog
2.7.10
scanner
    A scanner whose <<EOF>> rule has the action '|', so that it shares
     the action of the rule after it, can be generated again. Flex 2.7.9
     stopped with the m4 error "end of file in string" on such a rule.
     (#906)
    A scanner generated with -F or -CF no longer reads past the end of
     its transition table when its input contains a NUL character.
     (#628, #908)
2.7.9
scanner
    The #line directive that switches back to the generated file after
     each rule action now comes before the code that ends the rule, such
     as YY_BREAK, so that code is no longer attributed to the scanner
     file. Two more directives that pointed into the scanner file are
     gone: the one before the case label of a rule whose action is '|',
     and a repeated directive after the default rule. (#903)
2.7.8
scanner
    A scanner generated in C mode and compiled as C++ no longer defines
     a struct named yy_buffer_state, so it can be linked into the same
     program as a scanner generated with %option c++ without two
     different definitions of that struct. The C scanner's struct is now
     named yy_c_buffer_state in that case. A scanner compiled as C is
     unchanged, as are YY_BUFFER_STATE and yybuffer in both languages.
     Code that names struct yy_buffer_state directly in a C scanner
     compiled as C++ must use yy_c_buffer_state, or the typedefs, instead.
     (#831)
2.7.7
scanner
    The #line directives in a generated scanner now switch back to the
     generated file after each rule action, as Bison does, and the
     default rule no longer gets a #line directive of its own. Before,
     the code flex adds between actions, and the default rule, were
     attributed to lines of the scanner file, some of which did not
     exist. Compiler messages and coverage tools such as lcov 2.1 and
     later then pointed at the wrong lines or failed. (#903)
2.7.6
scanner
    A scanner no longer defines _POSIX_C_SOURCE and _POSIX_SOURCE ahead
     of the program's own code, and no longer includes <assert.h> for
     that purpose. Flex 2.6.5 to 2.7.5 did, which on systems whose
     headers hide declarations when those macros are set removed names
     the program uses: fileno_unlocked, which stopped GCC's Modula-2
     scanner from compiling, and SO_REUSEPORT, which stopped a program
     that includes boost asio. A strict ISO C mode still gets its own
     declaration of fileno. (#900, #901)
2.7.5
scanner
    Flex no longer writes outside its own buffers when a quoted %option
     value or a #line file name in the scanner file starts with a NUL
     byte. A NUL byte further inside such a value now cuts the value
     there and no longer also drops the character before it. (#725)
2.7.4
build
    Regenerating the build files now needs libtool 2.4.7 or newer. The
     first release whose configure script works on macOS 12 and later is
     2.4.7, and flex had asked only for 2.2. The release tarballs are now
     made with libtool 2.6.2, the current release. The release check now
     stops if it finds a configure script made by an older libtool; its
     earlier test looked for text that no released libtool writes. (#888)
scanner
    A program that declares struct yyguts_t itself, before the scanner,
     and supplies its own yyscan_t by defining YY_TYPEDEF_YY_SCANNER_T,
     compiles again with a prefixed reentrant scanner. Flex 2.7.3 put the
     prefix in the name of that structure, which made the program's
     declaration a different type from the scanner's, and doxygen would
     not build. Flex now leaves the name alone when the program defines
     YY_TYPEDEF_YY_SCANNER_T. A program that wants a prefixed name there
     can declare struct <prefix>guts_t. (#895)
    A reentrant C scanner can again set the member yy_flex_debug_r of
     its state structure, as it could with flex 2.6.4. Flex 2.6.5 renamed
     it to yyflexdebug_r, which stopped csound from building. The new
     name yyflexdebug, and the function yyset_debug(), still work. (#896)
2.7.3
build
    The release tarballs are now made with libtool 2.4.7, which has the
     fix that lets the configure script work on macOS 12 and later. The
     configure script in the 2.7.2 tarball was made with libtool 2.4.6
     and does not. The release check now stops if it finds the old
     script. (#888)
scanner
    A reentrant scanner made with a prefix now puts the prefix in the
     name of its state structure, yyguts_t, as it does for its other
     names. Before, two such scanners with different extra types, built
     as C++ and linked into one program, made the compiler warn that
     yyguts_t violates the One Definition Rule. Code that writes struct
     yyguts_t keeps working. (#877)
    A scanner file could run commands while flex was running by putting
     m4 macros in the file name of a #line directive, and so could the
     name of the input file given on the command line. Flex now rejects
     the sequences [[ and ]] in those names. A single bracket is still
     allowed. (#879)
    A scanner no longer writes into memory it has freed when a rule's
     action calls input() at the end of the buffer, which can move the
     buffer, and then calls yyless(). (#889)
    A scanner whose error handler does not end the program, because it
     uses longjmp() or throws an exception, no longer writes in front of
     its start-condition stack after yy_pop_state() is called on an
     empty stack. Before, the stack position was left below zero, and
     the next yy_push_state() wrote at that position. (#887)
    A batch scanner (-B) with compressed tables now matches a NUL byte
     that cannot extend the current token on its own. Since flex 2.6.5,
     the NUL was swallowed into the previous token. (#885)
2.7.2
scanner
    A scanner made with -Cf or -CF, without -Ce and without -7 or -8,
     now handles input bytes above 127. Before, flex made such a scanner
     7-bit, so its tables had no entries for those bytes, and a scanner
     given one read memory past its tables and could skip input or crash.
     These scanners are now 8-bit unless -7 is given, so their tables
     are larger. Building flex with -DDEFAULT_CSIZE=128 restores the old
     default. (#880)
2.7.1
scanner
    A scanner whose yytext is a pointer, which is the default, no longer
     reports a wrong yyleng, or reads memory in front of its input
     buffer, when a rule's action calls yymore() and then uses unput()
     to push back more characters than the rule matched. The next token
     now starts with the pushed-back characters, as no yymore() text is
     left to keep. (#874)
2.7.0
scanner
    A C++ scanner now stops the build with one message, naming the flex
     version that generated it, when the FlexLexer.h it finds is from
     another version of flex, as a copy kept in a project's own sources
     can be. Before, the compiler reported many errors about members the
     class did not have, such as yy_hold_ptr. FlexLexer.h now carries the
     version of flex it comes from for this check. A FlexLexer.h from
     flex 2.6.17 or earlier has no version and is refused as well;
     replace it with the one from this flex. (#872)
2.6.17
scanner
    A scanner no longer writes to memory in front of its input buffer
     when a rule's action uses unput() to push back more characters than
     the rule matched and then calls input() or yyinput() far enough to
     read past the end of the buffer. Flex 2.6.16 did this on every later
     call to input() or yyinput() in that action, which could corrupt
     memory. (#873)
2.6.16
scanner
    After a rule's action has called input() or yyinput(), yytext as a
     string ends where the token ends, as it did with flex 2.6.4. Flex
     2.6.14 made it run on over the characters that had been read, so a
     program that copied yytext after reading ahead, such as the
     gobject-introspection comment scanner, got those characters twice.
     The characters read are still left as they were in a buffer that
     the program supplied, and yyleng is unchanged. (#870)
    The C++ class yyFlexLexer in FlexLexer.h has one more member for
     this, so a C++ program should be rebuilt, along with every library
     of its own that includes FlexLexer.h, when it moves to this release.
    yyless() after input() or yyinput() gives back the right text and
     no longer writes a stale character over the end of the token. Before,
     the program's own buffer could be changed and the next token could
     start with the wrong character, as with flex 2.6.4.

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
 lfs/flex | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/lfs/flex b/lfs/flex
index d62ab303b..984976e21 100644
--- a/lfs/flex
+++ b/lfs/flex
@@ -24,7 +24,7 @@ 
 
 include Config
 
-VER        = 2.6.15
+VER        = 2.7.10
 
 THISAPP    = flex-$(VER)
 DL_FILE    = $(THISAPP).tar.gz
@@ -52,7 +52,7 @@  objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
 
-$(DL_FILE)_BLAKE2 = 6ef916385340813265c9837ce3f7fa6af848028ac941d834de228e6a658480a4a0539bc596b9080192a98541a2ea8bf7565c1db80aff82799545e4a8036fb27a
+$(DL_FILE)_BLAKE2 = 3e20f416385cdb08867b5eff65c14810dff339e4428dd0c76487774fea25c0c1a907423418e1ad6193a0b6804f6197c697e74b774b1f0511d82ed44aa42933fe
 
 install : $(TARGET)