/[gentoo-x86]/dev-util/kelbt/files/ragel-6.7+gcc-4.7.patch
Gentoo

Contents of /dev-util/kelbt/files/ragel-6.7+gcc-4.7.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Sun Jun 24 07:56:56 2012 UTC (2 years, 3 months ago) by flameeyes
Branch: MAIN
CVS Tags: HEAD
Add patch to fix build with gcc 4.7 (keep the same name since it's the same patch as ragel's).

(Portage version: 2.2.0_alpha110/cvs/Linux x86_64)

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

  ViewVC Help
Powered by ViewVC 1.1.20