~ubuntu-branches/ubuntu/vivid/drizzle/vivid

« back to all changes in this revision

Viewing changes to debian/patches/ftbfs-bison-2.7.patch

  • Committer: Package Import Robot
  • Author(s): Tobias Frost
  • Date: 2013-05-20 01:01:26 UTC
  • mfrom: (18.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20130520010126-0imtkm284p0f7t0s
Tags: 1:7.1.36-stable-3
* New patch boost-1.49.patch due to a boost problem showed with gcc >4.7
  (Closes: #701269)
* Adding Japanese (Closes: #692842) and Brazilian (Closes: #685770)
  translations
* Do not build undocumented commands drizzle_passwordhash and
  drizzlebackup.innobase (no man pages are available.) This is handled
  in the new patches donotbuild_drizzlepasswordhash.patch and
  donotbuild_drizzlebackup.innobase.patch
* Switch from hardening-wrapper to dpkg-buildflags
* Add patch ftbfs-bison-2.7.patch to fix a FTBS with recent bison.
  (cherry-picked from upstream)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#From: Tobias Frost <tobi@coldtobi.de>
 
2
#Subject: With newer bison (>2.7) yyscan_t is no longer defined and leads to FTBFS.
 
3
#Description: The below patch add the missing snippet to the bison input file,
 
4
# as it would has been defined with the older bison.
 
5
--- a/drizzled/execute/parser.yy
 
6
+++ b/drizzled/execute/parser.yy
 
7
@@ -37,16 +37,31 @@
 
8
  *
 
9
  */
 
10
 
 
11
+%{
 
12
+
 
13
+#include <config.h>
 
14
+#include <iostream>
 
15
+#include <stdint.h>
 
16
+#include "drizzled/execute/common.h"
 
17
+#include <drizzled/execute/scanner.h>
 
18
+#include <vector>
 
19
+
 
20
+#ifndef __INTEL_COMPILER
 
21
+# pragma GCC diagnostic ignored "-Wold-style-cast"
 
22
+#endif
 
23
+
 
24
+%}
 
25
+
 
26
 %error-verbose
 
27
 %debug
 
28
 %defines
 
29
 %expect 0
 
30
 %output "drizzled/execute/parser.cc"
 
31
 %defines "drizzled/execute/parser.h"
 
32
-%lex-param { yyscan_t *scanner }
 
33
+%lex-param { void *scanner }
 
34
 %name-prefix="execute_"
 
35
-%parse-param { ::drizzled::execute::Context *context }
 
36
-%parse-param { yyscan_t *scanner }
 
37
+%parse-param { class drizzled::execute::Context *context }
 
38
+%parse-param { void *scanner }
 
39
 %pure-parser
 
40
 %require "2.2"
 
41
 %start begin
 
42
@@ -54,26 +69,15 @@
 
43
 
 
44
 %{
 
45
 
 
46
-#include <config.h>
 
47
-#include <iostream>
 
48
-#include <stdint.h>
 
49
-#include <drizzled/execute/symbol.h>
 
50
-#include <drizzled/execute/scanner.h>
 
51
-#include <drizzled/execute/context.h>
 
52
-#include <vector>
 
53
-
 
54
-#ifndef __INTEL_COMPILER
 
55
-#pragma GCC diagnostic ignored "-Wold-style-cast"
 
56
-#endif
 
57
-
 
58
 #define YYENABLE_NLS 0
 
59
 #define YYLTYPE_IS_TRIVIAL 0
 
60
 
 
61
-int execute_lex(YYSTYPE* lvalp, void* scanner);
 
62
 std::string query;
 
63
 #define parser_abort(A, B) do { parser::abort_func((A), (B)); YYABORT; } while (0)
 
64
 
 
65
-inline void execute_error(::drizzled::execute::Context *context, yyscan_t *scanner, const char *error)
 
66
+namespace drizzled { namespace execute { class Context; }}
 
67
+
 
68
+inline void execute_error(class drizzled::execute::Context *context, void *scanner, const char *error)
 
69
 {
 
70
   if (not context->end())
 
71
   {
 
72
--- a/drizzled/execute/scanner.l
 
73
+++ b/drizzled/execute/scanner.l
 
74
@@ -41,10 +41,13 @@
 
75
 
 
76
 #include <config.h>
 
77
 #include <unistd.h>
 
78
-#include <drizzled/execute/parser.h>  
 
79
-#include <drizzled/execute/context.h>
 
80
-#include <drizzled/execute/symbol.h>
 
81
-#include <drizzled/lex_string.h>
 
82
+
 
83
+#ifndef execute_HEADER_H
 
84
+# define execute_HEADER_H 1
 
85
+#endif
 
86
+
 
87
+#include "drizzled/execute/common.h"
 
88
+#include "drizzled/lex_string.h"
 
89
 
 
90
 using namespace drizzled;
 
91
 
 
92
@@ -55,7 +58,9 @@
 
93
 #pragma GCC diagnostic ignored "-Wmissing-declarations"
 
94
 #endif
 
95
 
 
96
-#define YY_EXTRA_TYPE ::drizzled::execute::Context*
 
97
+#ifndef YY_EXTRA_TYPE
 
98
+# define YY_EXTRA_TYPE drizzled::execute::Context*
 
99
+#endif
 
100
 
 
101
 }
 
102
 
 
103
--- /dev/null
 
104
+++ b/drizzled/execute/common.h
 
105
@@ -0,0 +1,49 @@
 
106
+/*  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
 
107
+ * 
 
108
+ *  Drizzle Execute Parser
 
109
+ *
 
110
+ *  Copyright (C) 2013 Data Differential, http://datadifferential.com/
 
111
+ *
 
112
+ *  All rights reserved.
 
113
+ *
 
114
+ *  Redistribution and use in source and binary forms, with or without
 
115
+ *  modification, are permitted provided that the following conditions are
 
116
+ *  met:
 
117
+ *
 
118
+ *      * Redistributions of source code must retain the above copyright
 
119
+ *  notice, this list of conditions and the following disclaimer.
 
120
+ *
 
121
+ *      * Redistributions in binary form must reproduce the above
 
122
+ *  copyright notice, this list of conditions and the following disclaimer
 
123
+ *  in the documentation and/or other materials provided with the
 
124
+ *  distribution.
 
125
+ *
 
126
+ *      * The names of its contributors may not be used to endorse or
 
127
+ *  promote products derived from this software without specific prior
 
128
+ *  written permission.
 
129
+ *
 
130
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 
131
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 
132
+ *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 
133
+ *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 
134
+ *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 
135
+ *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 
136
+ *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 
137
+ *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 
138
+ *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 
139
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 
140
+ *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
141
+ *
 
142
+ */
 
143
+
 
144
+#pragma once
 
145
+
 
146
+#ifndef YY_TYPEDEF_YY_SCANNER_T
 
147
+# define YY_TYPEDEF_YY_SCANNER_T
 
148
+typedef void* yyscan_t;
 
149
+#endif
 
150
+
 
151
+#include "drizzled/execute/symbol.h"
 
152
+#include "drizzled/execute/context.h"
 
153
+#include "drizzled/execute/parser.h"
 
154
+#include "drizzled/execute/scanner.h"