From: Ed Swierk Date: Tue, 6 Jan 2015 15:21:07 +0000 (+0000) Subject: libxl: Fix building libxlu_cfg_y.y with bison 3.0 X-Git-Tag: RELEASE-4.4.4~7 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=a43691789e8f3597709a731a535c8e07fe1837ed;p=xen.git libxl: Fix building libxlu_cfg_y.y with bison 3.0 - Use %lex-param instead of obsolete YYLEX_PARAM to override lex scanner parameter - Change deprecated %name-prefix= to %name-prefix Tested against bison 2.4.1 and 3.0.2. This is expected to sometimes (depending on timestamps and whether the bison input files are edited) break building on systems with ancient versions of bison. Bison 2.4.1 is known to work and was released in December 2008. Also, consquentially, regenerate bison output files with bison 1:2.5.dfsg-2.1 from Debian wheezy. Signed-off-by: Ed Swierk Acked-by: Ian Jackson Tested-by: Wei Liu Signed-off-by: Ian Jackson Release-Acked-by: Konrad Rzeszutek Wilk (cherry picked from commit 7ba4cdfadd4f3c45d65ffe50e621759f458fedc0) [ I have checked that rebuilding the bison and flex input produces no further changes. -iwj ] Signed-off-by: Ian Jackson --- diff --git a/tools/libxl/libxlu_cfg_y.c b/tools/libxl/libxlu_cfg_y.c index 4437e05f1c..07b5a1d1fc 100644 --- a/tools/libxl/libxlu_cfg_y.c +++ b/tools/libxl/libxlu_cfg_y.c @@ -76,7 +76,7 @@ /* Line 268 of yacc.c */ #line 19 "libxlu_cfg_y.y" -#define YYLEX_PARAM ctx->scanner +#define ctx_scanner ctx->scanner #include "libxlu_cfg_i.h" #include "libxlu_cfg_l.h" @@ -656,7 +656,7 @@ while (YYID (0)) #ifdef YYLEX_PARAM # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) #else -# define YYLEX yylex (&yylval, &yylloc, scanner) +# define YYLEX yylex (&yylval, &yylloc, ctx_scanner) #endif /* Enable debugging if requested. */ diff --git a/tools/libxl/libxlu_cfg_y.y b/tools/libxl/libxlu_cfg_y.y index aa9f787d0e..5acd4380a5 100644 --- a/tools/libxl/libxlu_cfg_y.y +++ b/tools/libxl/libxlu_cfg_y.y @@ -17,7 +17,7 @@ */ %{ -#define YYLEX_PARAM ctx->scanner +#define ctx_scanner ctx->scanner #include "libxlu_cfg_i.h" #include "libxlu_cfg_l.h" %} @@ -31,9 +31,9 @@ %pure-parser %defines %error-verbose -%name-prefix="xlu__cfg_yy" +%name-prefix "xlu__cfg_yy" %parse-param { CfgParseContext *ctx } -%lex-param { void *scanner } +%lex-param { ctx_scanner } %token IDENT STRING NUMBER NEWLINE %type atom