]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
_AC_PROG_YYTEXT_DECL: Forward declare yywrap (#110312)
authorJannick <thirdedition@gmx.net>
Tue, 3 Nov 2020 15:11:23 +0000 (10:11 -0500)
committerZack Weinberg <zackw@panix.com>
Tue, 3 Nov 2020 15:11:23 +0000 (10:11 -0500)
Some versions of lex need you to forward-declare yywrap in a %{ %}
block before the rules section, if you’re going to define it yourself.

May help with bug #110312.

* lib/autoconf/programs.m4 (_AC_PROG_LEX_YYTEXT_DECL): In the test
  input to lex, forward-declare yywrap before the rules.

lib/autoconf/programs.m4

index e289a0185e2073857d037de52fb92f12b78a982c..b352ce2442a02ee5f6a42db68668753fd50fc311 100644 (file)
@@ -746,6 +746,9 @@ fi])])
 # declares yytext as a char * by default.
 AC_DEFUN([_AC_PROG_LEX_YYTEXT_DECL],
 [cat >conftest.l <<_ACEOF[
+%{
+int yywrap(void);
+%}
 %%
 a { ECHO; }
 b { REJECT; }