Gentoo Archives: gentoo-commits

From: "Samuli Suominen (ssuominen)" <ssuominen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-biology/vienna-rna/files: vienna-rna-1.7.2-gcc4.4.patch
Date: Thu, 30 Jul 2009 08:31:03
Message-Id: E1MWR2T-0002Ql-LT@stork.gentoo.org
1 ssuominen 09/07/30 08:31:01
2
3 Added: vienna-rna-1.7.2-gcc4.4.patch
4 Log:
5 Fix building with GCC 4.4 and GLIBC 2.10+ wrt #274044. Rename getline to v_getline. Missing include.
6 (Portage version: 2.2_rc33/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.1 sci-biology/vienna-rna/files/vienna-rna-1.7.2-gcc4.4.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-biology/vienna-rna/files/vienna-rna-1.7.2-gcc4.4.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-biology/vienna-rna/files/vienna-rna-1.7.2-gcc4.4.patch?rev=1.1&content-type=text/plain
13
14 Index: vienna-rna-1.7.2-gcc4.4.patch
15 ===================================================================
16 diff -ur ViennaRNA-1.7.2.orig/Kinfold/main.c ViennaRNA-1.7.2/Kinfold/main.c
17 --- ViennaRNA-1.7.2.orig/Kinfold/main.c 2006-11-24 10:13:55.000000000 +0200
18 +++ ViennaRNA-1.7.2/Kinfold/main.c 2009-07-30 11:27:39.000000000 +0300
19 @@ -27,7 +27,7 @@
20 /* PRIVAT FUNCTIONS */
21 static void ini_energy_model(void);
22 static void read_data(void);
23 -static char *getline(FILE *fp);
24 +static char *v_getline(FILE *fp);
25 static void clean_up(void);
26
27 /**/
28 @@ -133,7 +133,7 @@
29 /*
30 read sequence
31 */
32 - ctmp = getline(stdin);
33 + ctmp = v_getline(stdin);
34 len = strlen(ctmp);
35 GAV.farbe = (char *)calloc(len+1, sizeof(char));
36 assert(GAV.farbe != NULL);
37 @@ -153,7 +153,7 @@
38 read start structure
39 */
40 if (GTV.start) {
41 - ctmp = getline(stdin);
42 + ctmp = v_getline(stdin);
43 len = strlen(ctmp);
44 sscanf(ctmp, "%s", GAV.startform);
45
46 @@ -174,7 +174,7 @@
47 */
48 if (GTV.stop) {
49 s = GAV.stopform;
50 - while (( ctmp = getline(stdin))) {
51 + while (( ctmp = v_getline(stdin))) {
52 *s = (char *)calloc(GSV.len+1, sizeof(char));
53 sscanf(ctmp, "%s", *s);
54
55 @@ -207,7 +207,7 @@
56 }
57
58 /**/
59 -static char *getline(FILE *fp) {
60 +static char *v_getline(FILE *fp) {
61 char s[512], *line, *cp;
62
63 line = NULL;
64 diff -ur ViennaRNA-1.7.2.orig/Readseq/ureadseq.c ViennaRNA-1.7.2/Readseq/ureadseq.c
65 --- ViennaRNA-1.7.2.orig/Readseq/ureadseq.c 2002-11-27 13:23:56.000000000 +0200
66 +++ ViennaRNA-1.7.2/Readseq/ureadseq.c 2009-07-30 11:29:35.000000000 +0300
67 @@ -136,12 +136,12 @@
68 }
69 }
70
71 -Local void getline(struct ReadSeqVars *V)
72 +Local void v_getline(struct ReadSeqVars *V)
73 {
74 readline(V->f, V->s, &V->linestart);
75 }
76
77 -Local void ungetline(struct ReadSeqVars *V)
78 +Local void unv_getline(struct ReadSeqVars *V)
79 {
80 fseek(V->f, V->linestart, 0);
81 }
82 @@ -215,7 +215,7 @@
83
84 if (addfirst) addseq(V->s, V);
85 do {
86 - getline(V);
87 + v_getline(V);
88 V->done = feof(V->f);
89 V->done |= (*endTest)( &addend, &ungetend, V);
90 if (V->addit && (addend || !V->done) && (strlen(V->s) > margin)) {
91 @@ -226,7 +226,7 @@
92 if (V->choice == kListSequences) addinfo(V->seqid, V);
93 else {
94 V->allDone = (V->nseq >= V->choice);
95 - if (V->allDone && ungetend) ungetline(V);
96 + if (V->allDone && ungetend) unv_getline(V);
97 }
98 }
99
100 @@ -246,7 +246,7 @@
101
102 while (!V->allDone) {
103 do {
104 - getline(V);
105 + v_getline(V);
106 for (si= V->s; *si != 0 && *si < ' '; si++) *si= ' '; /* drop controls */
107 if (*si == 0) *V->s= 0; /* chop line to empty */
108 } while (! (feof(V->f) || ((*V->s != 0) && (*V->s != ';') ) ));
109 @@ -272,13 +272,13 @@
110 { /* ? only 1 seq/file ? */
111
112 while (!V->allDone) {
113 - getline(V);
114 + v_getline(V);
115 if (strstr(V->s,"; DNA sequence ") == V->s)
116 strcpy(V->seqid, (V->s)+16);
117 else
118 strcpy(V->seqid, (V->s)+1);
119 while ((!feof(V->f)) && (*V->s == ';')) {
120 - getline(V);
121 + v_getline(V);
122 }
123 if (feof(V->f)) V->allDone = true;
124 else readLoop(0, true, endStrider, V);
125 @@ -298,16 +298,16 @@
126
127 while (!V->allDone) {
128 while (! (feof(V->f) || strstr(V->s,"ENTRY") || strstr(V->s,"SEQUENCE")) )
129 - getline(V);
130 + v_getline(V);
131 strcpy(V->seqid, (V->s)+16);
132 while (! (feof(V->f) || strstr(V->s,"SEQUENCE") == V->s))
133 - getline(V);
134 + v_getline(V);
135 readLoop(0, false, endPIR, V);
136
137 if (!V->allDone) {
138 while (! (feof(V->f) || ((*V->s != 0)
139 && (strstr( V->s,"ENTRY") == V->s))))
140 - getline(V);
141 + v_getline(V);
142 }
143 if (feof(V->f)) V->allDone = true;
144 }
145 @@ -327,13 +327,13 @@
146 while (!V->allDone) {
147 strcpy(V->seqid, (V->s)+12);
148 while (! (feof(V->f) || strstr(V->s,"ORIGIN") == V->s))
149 - getline(V);
150 + v_getline(V);
151 readLoop(0, false, endGB, V);
152
153 if (!V->allDone) {
154 while (! (feof(V->f) || ((*V->s != 0)
155 && (strstr( V->s,"LOCUS") == V->s))))
156 - getline(V);
157 + v_getline(V);
158 }
159 if (feof(V->f)) V->allDone = true;
160 }
161 @@ -364,11 +364,11 @@
162 {
163 while (!V->allDone) {
164 strcpy(V->seqid, (V->s)+4);
165 - getline(V); /*skip title-junk line*/
166 + v_getline(V); /*skip title-junk line*/
167 readLoop(0, false, endNBRF, V);
168 if (!V->allDone) {
169 while (!(feof(V->f) || (*V->s != 0 && *V->s == '>')))
170 - getline(V);
171 + v_getline(V);
172 }
173 if (feof(V->f)) V->allDone = true;
174 }
175 @@ -390,7 +390,7 @@
176 readLoop(0, false, endPearson, V);
177 if (!V->allDone) {
178 while (!(feof(V->f) || ((*V->s != 0) && (*V->s == '>'))))
179 - getline(V);
180 + v_getline(V);
181 }
182 if (feof(V->f)) V->allDone = true;
183 }
184 @@ -410,14 +410,14 @@
185 while (!V->allDone) {
186 strcpy(V->seqid, (V->s)+5);
187 do {
188 - getline(V);
189 + v_getline(V);
190 } while (!(feof(V->f) | (strstr(V->s,"SQ ") == V->s)));
191
192 readLoop(0, false, endEMBL, V);
193 if (!V->allDone) {
194 while (!(feof(V->f) |
195 ((*V->s != '\0') & (strstr(V->s,"ID ") == V->s))))
196 - getline(V);
197 + v_getline(V);
198 }
199 if (feof(V->f)) V->allDone = true;
200 }
201 @@ -437,13 +437,13 @@
202 /*! 1st string is Zuker's Fortran format */
203
204 while (!V->allDone) {
205 - getline(V); /*s == "seqLen seqid string..."*/
206 + v_getline(V); /*s == "seqLen seqid string..."*/
207 strcpy(V->seqid, (V->s)+6);
208 readLoop(0, false, endZuker, V);
209 if (!V->allDone) {
210 while (!(feof(V->f) |
211 ((*V->s != '\0') & (*V->s == '('))))
212 - getline(V);
213 + v_getline(V);
214 }
215 if (feof(V->f)) V->allDone = true;
216 }
217 @@ -486,7 +486,7 @@
218 do {
219 addseq(V->s, V);
220 V->done = feof(V->f);
221 - getline(V);
222 + v_getline(V);
223 } while (!V->done);
224 if (V->choice == kListSequences) addinfo(V->seqid, V);
225 V->allDone = true;
226 @@ -498,7 +498,7 @@
227 /*
228 10nov91: Reading GCG files casued duplication of last line when
229 EOF followed that line !!!
230 - fix: getline now sets *V->s = 0
231 + fix: v_getline now sets *V->s = 0
232 */
233 char *si;
234
235 @@ -512,7 +512,7 @@
236 else if (si = strstr(V->seqid,"..")) *si = 0;
237 do {
238 V->done = feof(V->f);
239 - getline(V);
240 + v_getline(V);
241 if (!V->done) addseq((V->s), V);
242 } while (!V->done);
243 if (V->choice == kListSequences) addinfo(V->seqid, V);
244 @@ -531,7 +531,7 @@
245 if (V->addit) V->seqlen = 0;
246 rewind(V->f); V->nseq= 0;
247 do {
248 - getline(V);
249 + v_getline(V);
250 V->done = feof(V->f);
251
252 if (V->done && !(*V->s)) break;
253 @@ -614,7 +614,7 @@
254 if (V->addit) V->seqlen = 0;
255 rewind(V->f); V->nseq= 0;
256 do {
257 - getline(V);
258 + v_getline(V);
259 V->done = feof(V->f);
260
261 if (V->done && !(*V->s)) break;
262 @@ -685,7 +685,7 @@
263 domatch= (V->matchchar > 0);
264
265 do {
266 - getline(V);
267 + v_getline(V);
268 V->done = feof(V->f);
269
270 if (V->done && !(*V->s)) break;
271 @@ -766,7 +766,7 @@
272 /* rewind(V->f); V->nseq= 0; << do in caller !*/
273 indata= true; /* call here after we find "matrix" */
274 do {
275 - getline(V);
276 + v_getline(V);
277 V->done = feof(V->f);
278
279 if (V->done && !(*V->s)) break;
280 @@ -851,7 +851,7 @@
281 /* fprintf(stderr,"Phylip-ileaf: topnseq=%d topseqlen=%d\n",V->topnseq, V->topseqlen); */
282
283 do {
284 - getline(V);
285 + v_getline(V);
286 V->done = feof(V->f);
287
288 if (V->done && !(*V->s)) break;
289 @@ -904,7 +904,7 @@
290 while (isdigit(*si)) si++;
291 skipwhitespace(si);
292 V->topseqlen= atol(si);
293 - getline(V);
294 + v_getline(V);
295 while (!V->allDone) {
296 V->seqlencount= 0;
297 strncpy(V->seqid, (V->s), 10);
298 @@ -935,10 +935,10 @@
299 V->err = eFileNotFound;
300 else {
301
302 - for (l = skiplines_; l > 0; l--) getline( V);
303 + for (l = skiplines_; l > 0; l--) v_getline( V);
304
305 do {
306 - getline( V);
307 + v_getline( V);
308 for (l= strlen(V->s); (l > 0) && (V->s[l] == ' '); l--) ;
309 } while ((l == 0) && !feof(V->f));
310
311 @@ -963,7 +963,7 @@
312 char *cp;
313 /* rewind(V->f); V->nseq= 0; ?? assume it is at top ?? skiplines ... */
314 while (!done) {
315 - getline( V);
316 + v_getline( V);
317 tolowerstr( V->s);
318 if (strstr( V->s, "matrix")) done= true;
319 if (strstr( V->s, "interleav")) interleaved= true;
320 @@ -995,7 +995,7 @@
321 break;
322
323 case kFitch :
324 - strcpy(V->seqid, V->s); getline(V);
325 + strcpy(V->seqid, V->s); v_getline(V);
326 readFitch(V);
327 break;
328
329 @@ -1003,7 +1003,7 @@
330 do {
331 gotuw = (strstr(V->s,"..") != NULL);
332 if (gotuw) readUWGCG(V);
333 - getline(V);
334 + v_getline(V);
335 } while (!(feof(V->f) || V->allDone));
336 break;
337 }
338 diff -ur ViennaRNA-1.7.2.orig/RNAforester/src/rnafuncs.cpp ViennaRNA-1.7.2/RNAforester/src/rnafuncs.cpp
339 --- ViennaRNA-1.7.2.orig/RNAforester/src/rnafuncs.cpp 2005-08-05 13:52:50.000000000 +0300
340 +++ ViennaRNA-1.7.2/RNAforester/src/rnafuncs.cpp 2009-07-30 11:26:47.000000000 +0300
341 @@ -1,3 +1,5 @@
342 +#include <cstdio>
343 +
344 #include <algorithm>
345 #include <cctype>
346 #include <iomanip>