1 |
flameeyes 12/06/24 07:56:56 |
2 |
|
3 |
Added: ragel-6.7+gcc-4.7.patch |
4 |
Log: |
5 |
Add patch to fix build with gcc 4.7 (keep the same name since it's the same patch as ragel's). |
6 |
|
7 |
(Portage version: 2.2.0_alpha110/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 dev-util/kelbt/files/ragel-6.7+gcc-4.7.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/kelbt/files/ragel-6.7+gcc-4.7.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/kelbt/files/ragel-6.7+gcc-4.7.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: ragel-6.7+gcc-4.7.patch |
16 |
=================================================================== |
17 |
From 27454d1e55b2a5cefc3cc1044d036add9ee9a6d3 Mon Sep 17 00:00:00 2001 |
18 |
From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= <flameeyes@×××××××××.eu> |
19 |
Date: Tue, 22 May 2012 16:25:37 -0700 |
20 |
Subject: [PATCH] aapl: fix building with gcc-4.7.0 |
21 |
MIME-Version: 1.0 |
22 |
Content-Type: text/plain; charset=UTF-8 |
23 |
Content-Transfer-Encoding: 8bit |
24 |
|
25 |
Starting with GCC 4.7, you have to explicit methods inherited from |
26 |
base templates, otherwise it will refuse to build. |
27 |
|
28 |
--- |
29 |
|
30 |
The URL reported in the README is no longer registered, so I couldn't |
31 |
find a way to report this to an upstream project. |
32 |
|
33 |
Signed-off-by: Diego Elio Pettenò <flameeyes@×××××××××.eu> |
34 |
--- |
35 |
aapl/avlcommon.h | 12 ++++++------ |
36 |
aapl/bstcommon.h | 16 ++++++++-------- |
37 |
aapl/bubblesort.h | 2 +- |
38 |
aapl/mergesort.h | 2 +- |
39 |
4 files changed, 16 insertions(+), 16 deletions(-) |
40 |
|
41 |
diff --git a/aapl/avlcommon.h b/aapl/avlcommon.h |
42 |
index 06983bc..2e3c190 100644 |
43 |
--- a/aapl/avlcommon.h |
44 |
+++ b/aapl/avlcommon.h |
45 |
@@ -881,9 +881,9 @@ template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>:: |
46 |
} |
47 |
|
48 |
#ifdef AVL_BASIC |
49 |
- keyRelation = compare( *element, *curEl ); |
50 |
+ keyRelation = this->compare( *element, *curEl ); |
51 |
#else |
52 |
- keyRelation = compare( element->BASEKEY(getKey()), |
53 |
+ keyRelation = this->compare( element->BASEKEY(getKey()), |
54 |
curEl->BASEKEY(getKey()) ); |
55 |
#endif |
56 |
|
57 |
@@ -920,7 +920,7 @@ template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>:: |
58 |
long keyRelation; |
59 |
|
60 |
while (curEl) { |
61 |
- keyRelation = compare( *element, *curEl ); |
62 |
+ keyRelation = this->compare( *element, *curEl ); |
63 |
|
64 |
/* Do we go left? */ |
65 |
if ( keyRelation < 0 ) |
66 |
@@ -969,7 +969,7 @@ template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>:: |
67 |
return element; |
68 |
} |
69 |
|
70 |
- keyRelation = compare( key, curEl->BASEKEY(getKey()) ); |
71 |
+ keyRelation = this->compare( key, curEl->BASEKEY(getKey()) ); |
72 |
|
73 |
/* Do we go left? */ |
74 |
if ( keyRelation < 0 ) { |
75 |
@@ -1023,7 +1023,7 @@ template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>:: |
76 |
return element; |
77 |
} |
78 |
|
79 |
- keyRelation = compare(key, curEl->getKey()); |
80 |
+ keyRelation = this->compare(key, curEl->getKey()); |
81 |
|
82 |
/* Do we go left? */ |
83 |
if ( keyRelation < 0 ) { |
84 |
@@ -1058,7 +1058,7 @@ template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>:: |
85 |
long keyRelation; |
86 |
|
87 |
while (curEl) { |
88 |
- keyRelation = compare( key, curEl->BASEKEY(getKey()) ); |
89 |
+ keyRelation = this->compare( key, curEl->BASEKEY(getKey()) ); |
90 |
|
91 |
/* Do we go left? */ |
92 |
if ( keyRelation < 0 ) |
93 |
diff --git a/aapl/bstcommon.h b/aapl/bstcommon.h |
94 |
index 888717f..7c53ff3 100644 |
95 |
--- a/aapl/bstcommon.h |
96 |
+++ b/aapl/bstcommon.h |
97 |
@@ -361,7 +361,7 @@ template <BST_TEMPL_DEF> bool BstTable<BST_TEMPL_USE>:: |
98 |
} |
99 |
|
100 |
mid = lower + ((upper-lower)>>1); |
101 |
- keyRelation = compare(key, GET_KEY(*mid)); |
102 |
+ keyRelation = this->compare(key, GET_KEY(*mid)); |
103 |
|
104 |
if ( keyRelation < 0 ) |
105 |
upper = mid - 1; |
106 |
@@ -373,12 +373,12 @@ template <BST_TEMPL_DEF> bool BstTable<BST_TEMPL_USE>:: |
107 |
|
108 |
lower = mid - 1; |
109 |
while ( lower != lowEnd && |
110 |
- compare(key, GET_KEY(*lower)) == 0 ) |
111 |
+ this->compare(key, GET_KEY(*lower)) == 0 ) |
112 |
lower--; |
113 |
|
114 |
upper = mid + 1; |
115 |
while ( upper != highEnd && |
116 |
- compare(key, GET_KEY(*upper)) == 0 ) |
117 |
+ this->compare(key, GET_KEY(*upper)) == 0 ) |
118 |
upper++; |
119 |
|
120 |
low = (Element*)lower + 1; |
121 |
@@ -419,7 +419,7 @@ template <BST_TEMPL_DEF> Element *BstTable<BST_TEMPL_USE>:: |
122 |
} |
123 |
|
124 |
mid = lower + ((upper-lower)>>1); |
125 |
- keyRelation = compare(key, GET_KEY(*mid)); |
126 |
+ keyRelation = this->compare(key, GET_KEY(*mid)); |
127 |
|
128 |
if ( keyRelation < 0 ) |
129 |
upper = mid - 1; |
130 |
@@ -457,7 +457,7 @@ template <BST_TEMPL_DEF> Element *BstTable<BST_TEMPL_USE>:: |
131 |
} |
132 |
|
133 |
mid = lower + ((upper-lower)>>1); |
134 |
- keyRelation = compare(key, GET_KEY(*mid)); |
135 |
+ keyRelation = this->compare(key, GET_KEY(*mid)); |
136 |
|
137 |
if ( keyRelation < 0 ) |
138 |
upper = mid - 1; |
139 |
@@ -508,7 +508,7 @@ template <BST_TEMPL_DEF> Element *BstTable<BST_TEMPL_USE>:: |
140 |
} |
141 |
|
142 |
mid = lower + ((upper-lower)>>1); |
143 |
- keyRelation = compare(key, GET_KEY(*mid)); |
144 |
+ keyRelation = this->compare(key, GET_KEY(*mid)); |
145 |
|
146 |
if ( keyRelation < 0 ) |
147 |
upper = mid - 1; |
148 |
@@ -603,7 +603,7 @@ template <BST_TEMPL_DEF> Element *BstTable<BST_TEMPL_USE>:: |
149 |
} |
150 |
|
151 |
mid = lower + ((upper-lower)>>1); |
152 |
- keyRelation = compare(GET_KEY(el), GET_KEY(*mid)); |
153 |
+ keyRelation = this->compare(GET_KEY(el), GET_KEY(*mid)); |
154 |
|
155 |
if ( keyRelation < 0 ) |
156 |
upper = mid - 1; |
157 |
@@ -662,7 +662,7 @@ template <BST_TEMPL_DEF> Element *BstTable<BST_TEMPL_USE>:: |
158 |
} |
159 |
|
160 |
mid = lower + ((upper-lower)>>1); |
161 |
- keyRelation = compare(GET_KEY(el), GET_KEY(*mid)); |
162 |
+ keyRelation = this->compare(GET_KEY(el), GET_KEY(*mid)); |
163 |
|
164 |
if ( keyRelation < 0 ) |
165 |
upper = mid - 1; |
166 |
diff --git a/aapl/bubblesort.h b/aapl/bubblesort.h |
167 |
index bcc2fb6..f0f4ce5 100644 |
168 |
--- a/aapl/bubblesort.h |
169 |
+++ b/aapl/bubblesort.h |
170 |
@@ -72,7 +72,7 @@ template <class T, class Compare> void BubbleSort<T,Compare>:: |
171 |
changed = false; |
172 |
for ( long i = 0; i < len-pass; i++ ) { |
173 |
/* Do we swap pos with the next one? */ |
174 |
- if ( compare( data[i], data[i+1] ) > 0 ) { |
175 |
+ if ( this->compare( data[i], data[i+1] ) > 0 ) { |
176 |
char tmp[sizeof(T)]; |
177 |
|
178 |
/* Swap the two items. */ |
179 |
diff --git a/aapl/mergesort.h b/aapl/mergesort.h |
180 |
index 68b8426..8cefa73 100644 |
181 |
--- a/aapl/mergesort.h |
182 |
+++ b/aapl/mergesort.h |
183 |
@@ -110,7 +110,7 @@ template< class T, class Compare> void MergeSort<T,Compare>:: |
184 |
} |
185 |
else { |
186 |
/* Both upper and lower left. */ |
187 |
- if ( compare(*lower, *upper) <= 0 ) |
188 |
+ if ( this->compare(*lower, *upper) <= 0 ) |
189 |
memcpy( dest++, lower++, sizeof(T) ); |
190 |
else |
191 |
memcpy( dest++, upper++, sizeof(T) ); |
192 |
-- |
193 |
1.7.8.6 |