]> git.pld-linux.org Git - packages/mysql.git/blob - bison3.patch
- fix bison/yacc related build problems
[packages/mysql.git] / bison3.patch
1 --- Percona-Server-5.5.32-rel31.0/sql/sql_yacc.yy.orig  2013-07-01 05:16:34.000000000 +0200
2 +++ Percona-Server-5.5.32-rel31.0/sql/sql_yacc.yy       2013-08-18 21:33:19.181583895 +0200
3 @@ -26,8 +26,6 @@
4  ** The type will be void*, so it must be  cast to (THD*) when used.
5  ** Use the YYTHD macro for this.
6  */
7 -#define YYPARSE_PARAM yythd
8 -#define YYLEX_PARAM yythd
9  #define YYTHD ((THD *)yythd)
10  #define YYLIP (& YYTHD->m_parser_state->m_lip)
11  #define YYPS (& YYTHD->m_parser_state->m_yacc)
12 @@ -50,7 +50,7 @@
13  
14  const LEX_STRING null_lex_str={0,0};
15  
16 -#define yyoverflow(A,B,C,D,E,F) {ulong val= (ulong) *(F); if (my_yyoverflow((B), (D), &val)) { yyerror((char*) (A)); return 2; } else { *(F)= (YYSIZE_T)val; }}
17 +#define yyoverflow(A,B,C,D,E,F) {ulong val= (ulong) *(F); if (my_yyoverflow((B), (D), &val)) { yyerror(yythd, (char*) (A)); return 2; } else { *(F)= (YYSIZE_T)val; }}
18  
19  #undef         WARN_DEPRECATED                 /* this macro is also defined in mysql_priv.h */
20  #define WARN_DEPRECATED(A,B)                                        \
21 @@ -174,7 +172,7 @@
22    to abort from the parser.
23  */
24  
25 -void MYSQLerror(const char *s)
26 +void MYSQLerror(void *yythd, const char *s)
27  {
28    THD *thd= current_thd;
29  
30 @@ -490,7 +490,9 @@
31  bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
32  %}
33  
34 -%pure_parser                                   /* We have threads */
35 +%pure-parser                                   /* We have threads */
36 +%parse-param { void *yythd }
37 +%lex-param { void *yythd }
38  /*
39    Currently there are 240 shift/reduce conflicts.
40    We should not introduce new conflicts any more.
This page took 0.081661 seconds and 3 git commands to generate.