Gentoo Archives: gentoo-commits

From: "Markus Dittrich (markusle)" <markusle@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-mathematics/octave/files: octave-2.1.73-gcc-4.3.patch
Date: Fri, 18 Apr 2008 13:13:13
Message-Id: E1JmqOt-0006A1-QF@stork.gentoo.org
1 markusle 08/04/18 13:13:11
2
3 Added: octave-2.1.73-gcc-4.3.patch
4 Log:
5 Fix compile problems with gcc-4.3 (see bug #218176).
6 (Portage version: 2.1.5_rc3)
7
8 Revision Changes Path
9 1.1 sci-mathematics/octave/files/octave-2.1.73-gcc-4.3.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-mathematics/octave/files/octave-2.1.73-gcc-4.3.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-mathematics/octave/files/octave-2.1.73-gcc-4.3.patch?rev=1.1&content-type=text/plain
13
14 Index: octave-2.1.73-gcc-4.3.patch
15 ===================================================================
16 diff -Naur octave-2.1.73/doc/interpreter/munge-texi.cc octave-2.1.73.new/doc/interpreter/munge-texi.cc
17 --- octave-2.1.73/doc/interpreter/munge-texi.cc 2005-05-02 07:15:47.000000000 -0400
18 +++ octave-2.1.73.new/doc/interpreter/munge-texi.cc 2008-04-18 08:56:55.000000000 -0400
19 @@ -29,6 +29,8 @@
20 #include <iostream>
21 #include <fstream>
22 #include <string>
23 +#include <cstring>
24 +#include <cstdlib>
25 #include <map>
26
27 static const char doc_delim = '';
28 diff -Naur octave-2.1.73/liboctave/chMatrix.cc octave-2.1.73.new/liboctave/chMatrix.cc
29 --- octave-2.1.73/liboctave/chMatrix.cc 2005-05-02 07:16:21.000000000 -0400
30 +++ octave-2.1.73.new/liboctave/chMatrix.cc 2008-04-18 08:56:55.000000000 -0400
31 @@ -32,6 +32,7 @@
32
33 #include <iostream>
34 #include <string>
35 +#include <cstring>
36
37 #include "lo-error.h"
38 #include "str-vec.h"
39 diff -Naur octave-2.1.73/liboctave/data-conv.cc octave-2.1.73.new/liboctave/data-conv.cc
40 --- octave-2.1.73/liboctave/data-conv.cc 2005-05-02 07:16:22.000000000 -0400
41 +++ octave-2.1.73.new/liboctave/data-conv.cc 2008-04-18 08:56:55.000000000 -0400
42 @@ -28,6 +28,7 @@
43 #include <cctype>
44
45 #include <iostream>
46 +#include <cstdlib>
47
48 #include "byte-swap.h"
49 #include "data-conv.h"
50 diff -Naur octave-2.1.73/liboctave/lo-sysdep.cc octave-2.1.73.new/liboctave/lo-sysdep.cc
51 --- octave-2.1.73/liboctave/lo-sysdep.cc 2005-05-02 07:16:26.000000000 -0400
52 +++ octave-2.1.73.new/liboctave/lo-sysdep.cc 2008-04-18 08:56:55.000000000 -0400
53 @@ -27,6 +27,7 @@
54
55 #include <iostream>
56 #include <string>
57 +#include <cstring>
58
59 #ifdef HAVE_UNISTD_H
60 #ifdef HAVE_SYS_TYPES_H
61 diff -Naur octave-2.1.73/liboctave/lo-utils.cc octave-2.1.73.new/liboctave/lo-utils.cc
62 --- octave-2.1.73/liboctave/lo-utils.cc 2005-05-02 07:16:26.000000000 -0400
63 +++ octave-2.1.73.new/liboctave/lo-utils.cc 2008-04-18 08:56:55.000000000 -0400
64 @@ -31,6 +31,7 @@
65 #include <cstdio>
66
67 #include <string>
68 +#include <cstring>
69
70 #ifdef HAVE_UNISTD_H
71 #ifdef HAVE_SYS_TYPES_H
72 diff -Naur octave-2.1.73/liboctave/oct-env.cc octave-2.1.73.new/liboctave/oct-env.cc
73 --- octave-2.1.73/liboctave/oct-env.cc 2005-05-02 07:16:27.000000000 -0400
74 +++ octave-2.1.73.new/liboctave/oct-env.cc 2008-04-18 08:56:55.000000000 -0400
75 @@ -45,6 +45,7 @@
76 #include <cstdlib>
77
78 #include <string>
79 +#include <cstring>
80
81 #ifdef HAVE_UNISTD_H
82 #ifdef HAVE_SYS_TYPES_H
83 diff -Naur octave-2.1.73/liboctave/oct-sort.cc octave-2.1.73.new/liboctave/oct-sort.cc
84 --- octave-2.1.73/liboctave/oct-sort.cc 2005-05-02 07:16:28.000000000 -0400
85 +++ octave-2.1.73.new/liboctave/oct-sort.cc 2008-04-18 08:56:55.000000000 -0400
86 @@ -84,6 +84,9 @@
87 #include <config.h>
88 #endif
89
90 +#include <cstdlib>
91 +#include <cstring>
92 +
93 #include "lo-mappers.h"
94 #include "quit.h"
95 #include "oct-sort.h"
96 diff -Naur octave-2.1.73/src/DLD-FUNCTIONS/sort.cc octave-2.1.73.new/src/DLD-FUNCTIONS/sort.cc
97 --- octave-2.1.73/src/DLD-FUNCTIONS/sort.cc 2006-03-20 16:11:03.000000000 -0500
98 +++ octave-2.1.73.new/src/DLD-FUNCTIONS/sort.cc 2008-04-18 08:56:55.000000000 -0400
99 @@ -294,7 +294,7 @@
100 template class octave_sort<vec_index<unsigned EIGHT_BYTE_INT> *>;
101
102 template <>
103 -static octave_value
104 +octave_value
105 mx_sort (ArrayN<double> &m, int dim, sortmode mode)
106 {
107 octave_value retval;
108 @@ -345,11 +345,12 @@
109 // things up.
110
111 if (lo_ieee_signbit (octave_NaN))
112 + {
113 if (mode == UNDEFINED || mode == ASCENDING)
114 {
115 unsigned int i = 0;
116 double *vtmp = (double *)p;
117 - while (xisnan (vtmp[i++]) && i < ns);
118 + while (xisnan (vtmp[i++]) && i < ns) {}
119 for (unsigned int l = 0; l < ns - i + 1; l++)
120 vtmp[l] = vtmp[l+i-1];
121 for (unsigned int l = ns - i + 1; l < ns; l++)
122 @@ -359,12 +360,13 @@
123 {
124 unsigned int i = ns;
125 double *vtmp = (double *)p;
126 - while (xisnan (vtmp[--i]) && i > 0);
127 + while (xisnan (vtmp[--i]) && i > 0) {}
128 for (int l = i; l >= 0; l--)
129 vtmp[l-i+ns-1] = vtmp[l];
130 for (unsigned int l = 0; l < ns - i - 1; l++)
131 vtmp[l] = octave_NaN;
132 }
133 + }
134
135 p += ns;
136 }
137 @@ -404,10 +406,11 @@
138 // fix things up.
139
140 if (lo_ieee_signbit (octave_NaN))
141 + {
142 if (mode == UNDEFINED || mode == ASCENDING)
143 {
144 unsigned int i = 0;
145 - while (xisnan (v[i++*stride + offset]) && i < ns);
146 + while (xisnan (v[i++*stride + offset]) && i < ns) {}
147 for (unsigned int l = 0; l < ns - i + 1; l++)
148 v[l*stride + offset] = v[(l+i-1)*stride + offset];
149 for (unsigned int l = ns - i + 1; l < ns; l++)
150 @@ -416,12 +419,13 @@
151 else
152 {
153 unsigned int i = ns;
154 - while (xisnan (v[--i*stride + offset]) && i > 0);
155 + while (xisnan (v[--i*stride + offset]) && i > 0) {}
156 for (int l = i; l >= 0; l--)
157 v[(l-i+ns-1)*stride + offset] = v[l*stride + offset];
158 for (unsigned int l = 0; l < ns - i - 1; l++)
159 v[l*stride + offset] = octave_NaN;
160 }
161 + }
162 }
163 }
164
165 @@ -431,7 +435,7 @@
166 }
167
168 template <>
169 -static octave_value_list
170 +octave_value_list
171 mx_sort_indexed (ArrayN<double> &m, int dim, sortmode mode)
172 {
173 octave_value_list retval;
174 @@ -506,10 +510,11 @@
175 // If it will be sorted to the beginning, fix things up.
176
177 if (lo_ieee_signbit (octave_NaN))
178 + {
179 if (mode == UNDEFINED || mode == ASCENDING)
180 {
181 unsigned int i = 0;
182 - while (xisnan (v[i++*stride+offset]) && i < ns);
183 + while (xisnan (v[i++*stride+offset]) && i < ns) {}
184 OCTAVE_LOCAL_BUFFER (double, itmp, i - 1);
185 for (unsigned int l = 0; l < i -1; l++)
186 itmp[l] = idx(l*stride + offset);
187 @@ -527,7 +532,7 @@
188 else
189 {
190 unsigned int i = ns;
191 - while (xisnan (v[--i*stride+offset]) && i > 0);
192 + while (xisnan (v[--i*stride+offset]) && i > 0) {}
193 OCTAVE_LOCAL_BUFFER (double, itmp, ns - i - 1);
194 for (unsigned int l = 0; l < ns - i -1; l++)
195 itmp[l] = idx((l+i+1)*stride + offset);
196 @@ -542,6 +547,7 @@
197 idx(l*stride + offset) = itmp[k];
198 }
199 }
200 + }
201 }
202
203 retval(1) = idx;
204 diff -Naur octave-2.1.73/src/file-io.cc octave-2.1.73.new/src/file-io.cc
205 --- octave-2.1.73/src/file-io.cc 2006-03-20 16:11:02.000000000 -0500
206 +++ octave-2.1.73.new/src/file-io.cc 2008-04-18 08:56:55.000000000 -0400
207 @@ -42,6 +42,7 @@
208 #include <cerrno>
209 #include <climits>
210 #include <cstdio>
211 +#include <cstring>
212
213 #include <iostream>
214 #include <vector>
215 diff -Naur octave-2.1.73/src/oct-stream.cc octave-2.1.73.new/src/oct-stream.cc
216 --- octave-2.1.73/src/oct-stream.cc 2005-05-05 15:07:24.000000000 -0400
217 +++ octave-2.1.73.new/src/oct-stream.cc 2008-04-18 08:56:55.000000000 -0400
218 @@ -1255,7 +1255,7 @@
219 int c3 = is.get ();
220
221 if (c3 != EOF)
222 -
223 + {
224 if (c3 == 'f')
225 {
226 int c4 = is.get ();
227 @@ -1290,6 +1290,7 @@
228
229 is >> ref;
230 }
231 + }
232 }
233 else
234 {
235 diff -Naur octave-2.1.73/src/ov-fcn-inline.cc octave-2.1.73.new/src/ov-fcn-inline.cc
236 --- octave-2.1.73/src/ov-fcn-inline.cc 2005-05-02 07:17:16.000000000 -0400
237 +++ octave-2.1.73.new/src/ov-fcn-inline.cc 2008-04-18 08:56:55.000000000 -0400
238 @@ -126,7 +126,7 @@
239 OSSTREAM buf;
240
241 // Skip preceeding newline(s)
242 - while (is.get (c) && c == '\n');
243 + while (is.get (c) && c == '\n') {}
244
245 if (is)
246 {
247 diff -Naur octave-2.1.73/src/parse.y octave-2.1.73.new/src/parse.y
248 --- octave-2.1.73/src/parse.y 2006-03-20 16:11:03.000000000 -0500
249 +++ octave-2.1.73.new/src/parse.y 2008-04-18 08:56:55.000000000 -0400
250 @@ -34,6 +34,7 @@
251
252 #include <cassert>
253 #include <cstdio>
254 +#include <cstring>
255
256 #ifdef YYBYACC
257 #include <cstdlib>
258 diff -Naur octave-2.1.73/src/pr-output.cc octave-2.1.73.new/src/pr-output.cc
259 --- octave-2.1.73/src/pr-output.cc 2005-05-02 07:17:17.000000000 -0400
260 +++ octave-2.1.73.new/src/pr-output.cc 2008-04-18 08:56:55.000000000 -0400
261 @@ -1602,7 +1602,7 @@
262 }
263
264 template <>
265 -static inline void
266 +inline void
267 pr_plus_format (std::ostream& os, const Complex& c)
268 {
269 double rp = c.real ();
270 diff -Naur octave-2.1.73/src/unwind-prot.cc octave-2.1.73.new/src/unwind-prot.cc
271 --- octave-2.1.73/src/unwind-prot.cc 2005-05-02 07:17:20.000000000 -0400
272 +++ octave-2.1.73.new/src/unwind-prot.cc 2008-04-18 08:56:55.000000000 -0400
273 @@ -30,6 +30,7 @@
274 #endif
275
276 #include <cstddef>
277 +#include <cstring>
278
279 #include "CMatrix.h"
280
281
282
283
284 --
285 gentoo-commits@l.g.o mailing list