]> git.pld-linux.org Git - packages/mysql.git/commitdiff
- fix bison/yacc related build problems
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 29 Aug 2013 10:33:54 +0000 (12:33 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 29 Aug 2013 10:33:54 +0000 (12:33 +0200)
bison3.patch [new file with mode: 0644]
mysql-yacc.patch [new file with mode: 0644]
mysql.spec

diff --git a/bison3.patch b/bison3.patch
new file mode 100644 (file)
index 0000000..ae889df
--- /dev/null
@@ -0,0 +1,40 @@
+--- Percona-Server-5.5.32-rel31.0/sql/sql_yacc.yy.orig 2013-07-01 05:16:34.000000000 +0200
++++ Percona-Server-5.5.32-rel31.0/sql/sql_yacc.yy      2013-08-18 21:33:19.181583895 +0200
+@@ -26,8 +26,6 @@
+ ** The type will be void*, so it must be  cast to (THD*) when used.
+ ** Use the YYTHD macro for this.
+ */
+-#define YYPARSE_PARAM yythd
+-#define YYLEX_PARAM yythd
+ #define YYTHD ((THD *)yythd)
+ #define YYLIP (& YYTHD->m_parser_state->m_lip)
+ #define YYPS (& YYTHD->m_parser_state->m_yacc)
+@@ -50,7 +50,7 @@
+ const LEX_STRING null_lex_str={0,0};
+-#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; }}
++#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; }}
+ #undef        WARN_DEPRECATED                 /* this macro is also defined in mysql_priv.h */
+ #define WARN_DEPRECATED(A,B)                                        \
+@@ -174,7 +172,7 @@
+   to abort from the parser.
+ */
+-void MYSQLerror(const char *s)
++void MYSQLerror(void *yythd, const char *s)
+ {
+   THD *thd= current_thd;
+@@ -490,7 +490,9 @@
+ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
+ %}
+-%pure_parser                                  /* We have threads */
++%pure-parser                                  /* We have threads */
++%parse-param { void *yythd }
++%lex-param { void *yythd }
+ /*
+   Currently there are 240 shift/reduce conflicts.
+   We should not introduce new conflicts any more.
diff --git a/mysql-yacc.patch b/mysql-yacc.patch
new file mode 100644 (file)
index 0000000..a107162
--- /dev/null
@@ -0,0 +1,47 @@
+--- mysql-5.0.96/configure.in  2013-08-29 12:23:55.810760951 +0200
++++ mysql-5.0.96.new/configure.in      2013-08-29 12:23:37.173464030 +0200
+@@ -269,6 +269,29 @@
+ AC_SUBST(NM)dnl
++##############################################################################
++# In automake 1.12, the extension on generated yacc/bison header files changed
++##############################################################################
++
++YACC_HEXT="h"
++MAKEFILE_1ST=`head -1 "$srcdir/Makefile.in"`
++AMAKE_MAJOR=`expr "$MAKEFILE_1ST" : '.*generated by automake \([[0-9]]*\).*'`
++if test $? -eq "0" ; then
++  if test "$AMAKE_MAJOR" -gt "1" ; then
++    YACC_HEXT="hh"
++    CXXFLAGS="$CXXFLAGS -DYACC_HEXT_HH"
++  elif test "$AMAKE_MAJOR" -eq "1" ; then
++    AMAKE_MINOR=`expr "$MAKEFILE_1ST" : '.*generated by automake 1.\([[0-9]]*\).*'`
++    if test $? -eq "0" ; then
++      if test "$AMAKE_MINOR" -ge "12" ; then
++        YACC_HEXT="hh"
++        CXXFLAGS="$CXXFLAGS -DYACC_HEXT_HH"
++      fi
++    fi
++  fi
++fi
++AC_SUBST(YACC_HEXT)
++
+ # NM= "$NM -X64"
+ #archive_expsym_cmds= `echo "$archive_expsym_cmds" | sed -e '/"$(CC)"//'`
+ #archive_expsym_cmds= "$CC -q64 $archive_expsym_cmds"
+--- mysql-5.0.96/sql/sql_lex.h 2013-08-29 12:23:55.444081885 +0200
++++ mysql-5.0.96.new/sql/sql_lex.h     2013-08-29 12:22:30.567877721 +0200
+@@ -37,7 +37,11 @@
+ #else
+ #include "lex_symbol.h"
+ #if MYSQL_LEX
+-#include "sql_yacc.h"
++#  if YACC_HEXT_HH
++#    include "sql_yacc.hh"
++#  else
++#    include "sql_yacc.h"
++#  endif
+ #define LEX_YYSTYPE YYSTYPE *
+ #else
+ #define LEX_YYSTYPE void *
index 16f264c5c08d97776f0f1dfa051c3311e000d457..db5c84e51a2efb10bfe05ce780948451970d06ef 100644 (file)
@@ -74,8 +74,9 @@ Patch21:      %{name}-atomic.patch
 Patch22:       %{name}-fix-dummy-thread-race-condition.patch
 # ourdelta
 Patch23:       big_tables_fixlp284123_fix%{name}35346.patch
-
+Patch24:       bison3.patch
 Patch25:       %{name}-sslchain.patch
+Patch26:       %{name}-yacc.patch
 # <percona patches, http://www.percona.com/percona-lab.html>
 Patch100:      %{name}-show_patches.patch
 Patch101:      %{name}-microslow_innodb.patch
@@ -572,8 +573,9 @@ mv sphinx-*/mysqlse sql/sphinx
 %patch21 -p0
 %patch22 -p1
 %patch23 -p1
-
+%patch24 -p1
 %patch25 -p1
+%patch26 -p1
 
 %{__sed} -i -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.in
 
This page took 0.200808 seconds and 4 git commands to generate.