mirror of
git://git.sv.gnu.org/autoconf
synced 2025-02-05 11:10:57 +08:00
AC_PROG_LEX no longer sets LEXLIB for yywrap
Suggested by Zack Weinberg in: https://lists.gnu.org/r/autoconf-patches/2020-07/msg00016.html * lib/autoconf/programs.m4 (_AC_PROG_LEX_YYTEXT_DECL): Define yywrap too.
This commit is contained in:
parent
eb4a1d7faf
commit
29ede6b96f
4
NEWS
4
NEWS
@ -104,6 +104,10 @@ GNU Autoconf NEWS - User visible changes.
|
|||||||
- AC_PROG_CC_STDC, AC_PROG_CC_C89, AC_PROG_CC_C99 have been marked as obsolete.
|
- AC_PROG_CC_STDC, AC_PROG_CC_C89, AC_PROG_CC_C99 have been marked as obsolete.
|
||||||
Applications should use AC_PROG_CC.
|
Applications should use AC_PROG_CC.
|
||||||
|
|
||||||
|
- AC_PROG_LEX no longer sets LEXLIB to be nonempty merely to define
|
||||||
|
the yywrap function. Packages should define yywrap themselves, or
|
||||||
|
use %noyywrap.
|
||||||
|
|
||||||
- AC_USE_SYSTEM_EXTENSIONS now enables more extensions on HP-UX,
|
- AC_USE_SYSTEM_EXTENSIONS now enables more extensions on HP-UX,
|
||||||
macOS, and MINIX, as well as on systems conforming to recent
|
macOS, and MINIX, as well as on systems conforming to recent
|
||||||
ISO/IEC C technical reports and specifications.
|
ISO/IEC C technical reports and specifications.
|
||||||
|
@ -4177,15 +4177,20 @@ The result of the test can be overridden by setting the variable
|
|||||||
@cvindex YYTEXT_POINTER
|
@cvindex YYTEXT_POINTER
|
||||||
@ovindex LEX_OUTPUT_ROOT
|
@ovindex LEX_OUTPUT_ROOT
|
||||||
@caindex prog_LEX
|
@caindex prog_LEX
|
||||||
If @code{flex} is found, set output variable @code{LEX} to @samp{flex}
|
If @code{flex} is found, set output variable @code{LEX} to @samp{flex}.
|
||||||
and @code{LEXLIB} to @option{-lfl}, if that library is in a standard
|
Otherwise set @code{LEX} to @samp{lex}, if found.
|
||||||
place. Otherwise set @code{LEX} to @samp{lex} and @code{LEXLIB} to
|
If neither variant is available, set @code{LEX}
|
||||||
@option{-ll}, if found. If neither variant is available, set @code{LEX}
|
|
||||||
to @samp{:}; for packages that ship the generated @file{file.yy.c}
|
to @samp{:}; for packages that ship the generated @file{file.yy.c}
|
||||||
alongside the source @file{file.l}, this default allows users without a
|
alongside the source @file{file.l}, this default allows users without a
|
||||||
lexer generator to still build the package even if the timestamp for
|
lexer generator to still build the package even if the timestamp for
|
||||||
@file{file.l} is inadvertently changed.
|
@file{file.l} is inadvertently changed.
|
||||||
|
|
||||||
|
If generated lexers need a library to work, set output variable
|
||||||
|
@code{LEXLIB} to an option for that library (e.g., @option{-ll});
|
||||||
|
otherwise define @code{LEXLIB} to empty. A library that merely defines
|
||||||
|
@code{main} and @code{yywrap} placeholder functions is not considered
|
||||||
|
to be needed.
|
||||||
|
|
||||||
Define @code{YYTEXT_POINTER} if @code{yytext} defaults to @samp{char *} instead
|
Define @code{YYTEXT_POINTER} if @code{yytext} defaults to @samp{char *} instead
|
||||||
of to @samp{char []}. Also set output variable @code{LEX_OUTPUT_ROOT} to
|
of to @samp{char []}. Also set output variable @code{LEX_OUTPUT_ROOT} to
|
||||||
the base of the file name that the lexer generates; usually
|
the base of the file name that the lexer generates; usually
|
||||||
|
@ -735,6 +735,11 @@ f { unput (yytext[0]); }
|
|||||||
extern char *yytext;
|
extern char *yytext;
|
||||||
#endif
|
#endif
|
||||||
int
|
int
|
||||||
|
yywrap (void)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
int
|
||||||
main (void)
|
main (void)
|
||||||
{
|
{
|
||||||
return ! yylex () + ! yywrap ();
|
return ! yylex () + ! yywrap ();
|
||||||
|
Loading…
Reference in New Issue
Block a user