Index: Makefile.inc1 =================================================================== --- Makefile.inc1 +++ Makefile.inc1 @@ -2219,7 +2219,7 @@ # If you add a new bootstrap tool where we could also use the host version, # please ensure that you also add a .else case where you add the tool to the # _bootstrap_tools_links variable. -.if ${BOOTSTRAPPING} < 1000033 +.if ${BOOTSTRAPPING} < 1300099 # Note: lex needs m4 to build but m4 also depends on lex (which needs m4 to # generate any files). To fix this cyclic dependency we can build a bootstrap # version of m4 (with pre-generated files) then use that to build the real m4. Index: usr.bin/lex/initparse.c =================================================================== --- usr.bin/lex/initparse.c +++ usr.bin/lex/initparse.c @@ -6,7 +6,7 @@ #define YYBYACC 1 #define YYMAJOR 1 #define YYMINOR 9 -#define YYPATCH 20170430 +#define YYPATCH 20200330 #define YYEMPTY (-1) #define yyclearin (yychar = YYEMPTY) @@ -130,6 +130,10 @@ # define YYLEX yylex() #endif +#if !(defined(yylex) || defined(YYSTATE)) +int YYLEX_DECL(); +#endif + /* Parameters sent to yyerror. */ #ifndef YYERROR_DECL #define YYERROR_DECL() yyerror(const char *s) @@ -488,13 +492,15 @@ }; #endif +#if YYDEBUG int yydebug; -int yynerrs; +#endif int yyerrflag; int yychar; YYSTYPE yyval; YYSTYPE yylval; +int yynerrs; /* define the initial stack-sizes */ #ifdef YYSTACKSIZE @@ -655,7 +661,7 @@ { (void)msg; } -#line 656 "parse.c" +#line 662 "parse.c" #if YYDEBUG #include /* needed for printf */ @@ -681,14 +687,14 @@ i = (int) (data->s_mark - data->s_base); newss = (YYINT *)realloc(data->s_base, newsize * sizeof(*newss)); - if (newss == NULL) + if (newss == 0) return YYENOMEM; data->s_base = newss; data->s_mark = newss + i; newvs = (YYSTYPE *)realloc(data->l_base, newsize * sizeof(*newvs)); - if (newvs == NULL) + if (newvs == 0) return YYENOMEM; data->l_base = newvs; @@ -722,7 +728,7 @@ #if YYDEBUG const char *yys; - if ((yys = getenv("YYDEBUG")) != NULL) + if ((yys = getenv("YYDEBUG")) != 0) { yyn = *yys; if (yyn >= '0' && yyn <= '9') @@ -1781,7 +1787,7 @@ #line 946 "parse.y" { yyval = mkstate( SYM_EPSILON ); } break; -#line 1782 "parse.c" +#line 1788 "parse.c" } yystack.s_mark -= yym; yystate = *yystack.s_mark; Index: usr.bin/lex/initscan.c =================================================================== --- usr.bin/lex/initscan.c +++ usr.bin/lex/initscan.c @@ -3434,7 +3434,7 @@ } nmstr[yyleng - 2 - end_is_ws] = '\0'; /* chop trailing brace */ - if ( (nmdefptr = ndlookup( nmstr )) == NULL ) + if ( (nmdefptr = ndlookup( nmstr )) == 0 ) format_synerr( _( "undefined definition {%s}" ), nmstr ); Index: usr.bin/lex/initskel.c =================================================================== --- usr.bin/lex/initskel.c +++ usr.bin/lex/initskel.c @@ -448,11 +448,7 @@ "/* First, we deal with platform-specific or compiler-specific issues. */", "", "#if defined(__FreeBSD__)", - "#ifndef __STDC_LIMIT_MACROS", - "#define __STDC_LIMIT_MACROS", - "#endif", "#include ", - "#include ", "#else", "#define __dead2", "#endif",