summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Dittrich <markusle@gentoo.org>2008-04-18 13:13:11 +0000
committerMarkus Dittrich <markusle@gentoo.org>2008-04-18 13:13:11 +0000
commitc4c0528c1eac58e6e99d3bc7c11259085dce3f5a (patch)
tree78d813a44469039aa327643988ebd896a61ce13e /sci-mathematics/octave/files
parentVersion bump. Fixed tests. Added long description. Drop old. (diff)
downloadgentoo-2-c4c0528c1eac58e6e99d3bc7c11259085dce3f5a.tar.gz
gentoo-2-c4c0528c1eac58e6e99d3bc7c11259085dce3f5a.tar.bz2
gentoo-2-c4c0528c1eac58e6e99d3bc7c11259085dce3f5a.zip
Fix compile problems with gcc-4.3 (see bug #218176).
(Portage version: 2.1.5_rc3)
Diffstat (limited to 'sci-mathematics/octave/files')
-rw-r--r--sci-mathematics/octave/files/octave-2.1.73-gcc-4.3.patch265
1 files changed, 265 insertions, 0 deletions
diff --git a/sci-mathematics/octave/files/octave-2.1.73-gcc-4.3.patch b/sci-mathematics/octave/files/octave-2.1.73-gcc-4.3.patch
new file mode 100644
index 000000000000..622b32cf1b26
--- /dev/null
+++ b/sci-mathematics/octave/files/octave-2.1.73-gcc-4.3.patch
@@ -0,0 +1,265 @@
+diff -Naur octave-2.1.73/doc/interpreter/munge-texi.cc octave-2.1.73.new/doc/interpreter/munge-texi.cc
+--- octave-2.1.73/doc/interpreter/munge-texi.cc 2005-05-02 07:15:47.000000000 -0400
++++ octave-2.1.73.new/doc/interpreter/munge-texi.cc 2008-04-18 08:56:55.000000000 -0400
+@@ -29,6 +29,8 @@
+ #include <iostream>
+ #include <fstream>
+ #include <string>
++#include <cstring>
++#include <cstdlib>
+ #include <map>
+
+ static const char doc_delim = '';
+diff -Naur octave-2.1.73/liboctave/chMatrix.cc octave-2.1.73.new/liboctave/chMatrix.cc
+--- octave-2.1.73/liboctave/chMatrix.cc 2005-05-02 07:16:21.000000000 -0400
++++ octave-2.1.73.new/liboctave/chMatrix.cc 2008-04-18 08:56:55.000000000 -0400
+@@ -32,6 +32,7 @@
+
+ #include <iostream>
+ #include <string>
++#include <cstring>
+
+ #include "lo-error.h"
+ #include "str-vec.h"
+diff -Naur octave-2.1.73/liboctave/data-conv.cc octave-2.1.73.new/liboctave/data-conv.cc
+--- octave-2.1.73/liboctave/data-conv.cc 2005-05-02 07:16:22.000000000 -0400
++++ octave-2.1.73.new/liboctave/data-conv.cc 2008-04-18 08:56:55.000000000 -0400
+@@ -28,6 +28,7 @@
+ #include <cctype>
+
+ #include <iostream>
++#include <cstdlib>
+
+ #include "byte-swap.h"
+ #include "data-conv.h"
+diff -Naur octave-2.1.73/liboctave/lo-sysdep.cc octave-2.1.73.new/liboctave/lo-sysdep.cc
+--- octave-2.1.73/liboctave/lo-sysdep.cc 2005-05-02 07:16:26.000000000 -0400
++++ octave-2.1.73.new/liboctave/lo-sysdep.cc 2008-04-18 08:56:55.000000000 -0400
+@@ -27,6 +27,7 @@
+
+ #include <iostream>
+ #include <string>
++#include <cstring>
+
+ #ifdef HAVE_UNISTD_H
+ #ifdef HAVE_SYS_TYPES_H
+diff -Naur octave-2.1.73/liboctave/lo-utils.cc octave-2.1.73.new/liboctave/lo-utils.cc
+--- octave-2.1.73/liboctave/lo-utils.cc 2005-05-02 07:16:26.000000000 -0400
++++ octave-2.1.73.new/liboctave/lo-utils.cc 2008-04-18 08:56:55.000000000 -0400
+@@ -31,6 +31,7 @@
+ #include <cstdio>
+
+ #include <string>
++#include <cstring>
+
+ #ifdef HAVE_UNISTD_H
+ #ifdef HAVE_SYS_TYPES_H
+diff -Naur octave-2.1.73/liboctave/oct-env.cc octave-2.1.73.new/liboctave/oct-env.cc
+--- octave-2.1.73/liboctave/oct-env.cc 2005-05-02 07:16:27.000000000 -0400
++++ octave-2.1.73.new/liboctave/oct-env.cc 2008-04-18 08:56:55.000000000 -0400
+@@ -45,6 +45,7 @@
+ #include <cstdlib>
+
+ #include <string>
++#include <cstring>
+
+ #ifdef HAVE_UNISTD_H
+ #ifdef HAVE_SYS_TYPES_H
+diff -Naur octave-2.1.73/liboctave/oct-sort.cc octave-2.1.73.new/liboctave/oct-sort.cc
+--- octave-2.1.73/liboctave/oct-sort.cc 2005-05-02 07:16:28.000000000 -0400
++++ octave-2.1.73.new/liboctave/oct-sort.cc 2008-04-18 08:56:55.000000000 -0400
+@@ -84,6 +84,9 @@
+ #include <config.h>
+ #endif
+
++#include <cstdlib>
++#include <cstring>
++
+ #include "lo-mappers.h"
+ #include "quit.h"
+ #include "oct-sort.h"
+diff -Naur octave-2.1.73/src/DLD-FUNCTIONS/sort.cc octave-2.1.73.new/src/DLD-FUNCTIONS/sort.cc
+--- octave-2.1.73/src/DLD-FUNCTIONS/sort.cc 2006-03-20 16:11:03.000000000 -0500
++++ octave-2.1.73.new/src/DLD-FUNCTIONS/sort.cc 2008-04-18 08:56:55.000000000 -0400
+@@ -294,7 +294,7 @@
+ template class octave_sort<vec_index<unsigned EIGHT_BYTE_INT> *>;
+
+ template <>
+-static octave_value
++octave_value
+ mx_sort (ArrayN<double> &m, int dim, sortmode mode)
+ {
+ octave_value retval;
+@@ -345,11 +345,12 @@
+ // things up.
+
+ if (lo_ieee_signbit (octave_NaN))
++ {
+ if (mode == UNDEFINED || mode == ASCENDING)
+ {
+ unsigned int i = 0;
+ double *vtmp = (double *)p;
+- while (xisnan (vtmp[i++]) && i < ns);
++ while (xisnan (vtmp[i++]) && i < ns) {}
+ for (unsigned int l = 0; l < ns - i + 1; l++)
+ vtmp[l] = vtmp[l+i-1];
+ for (unsigned int l = ns - i + 1; l < ns; l++)
+@@ -359,12 +360,13 @@
+ {
+ unsigned int i = ns;
+ double *vtmp = (double *)p;
+- while (xisnan (vtmp[--i]) && i > 0);
++ while (xisnan (vtmp[--i]) && i > 0) {}
+ for (int l = i; l >= 0; l--)
+ vtmp[l-i+ns-1] = vtmp[l];
+ for (unsigned int l = 0; l < ns - i - 1; l++)
+ vtmp[l] = octave_NaN;
+ }
++ }
+
+ p += ns;
+ }
+@@ -404,10 +406,11 @@
+ // fix things up.
+
+ if (lo_ieee_signbit (octave_NaN))
++ {
+ if (mode == UNDEFINED || mode == ASCENDING)
+ {
+ unsigned int i = 0;
+- while (xisnan (v[i++*stride + offset]) && i < ns);
++ while (xisnan (v[i++*stride + offset]) && i < ns) {}
+ for (unsigned int l = 0; l < ns - i + 1; l++)
+ v[l*stride + offset] = v[(l+i-1)*stride + offset];
+ for (unsigned int l = ns - i + 1; l < ns; l++)
+@@ -416,12 +419,13 @@
+ else
+ {
+ unsigned int i = ns;
+- while (xisnan (v[--i*stride + offset]) && i > 0);
++ while (xisnan (v[--i*stride + offset]) && i > 0) {}
+ for (int l = i; l >= 0; l--)
+ v[(l-i+ns-1)*stride + offset] = v[l*stride + offset];
+ for (unsigned int l = 0; l < ns - i - 1; l++)
+ v[l*stride + offset] = octave_NaN;
+ }
++ }
+ }
+ }
+
+@@ -431,7 +435,7 @@
+ }
+
+ template <>
+-static octave_value_list
++octave_value_list
+ mx_sort_indexed (ArrayN<double> &m, int dim, sortmode mode)
+ {
+ octave_value_list retval;
+@@ -506,10 +510,11 @@
+ // If it will be sorted to the beginning, fix things up.
+
+ if (lo_ieee_signbit (octave_NaN))
++ {
+ if (mode == UNDEFINED || mode == ASCENDING)
+ {
+ unsigned int i = 0;
+- while (xisnan (v[i++*stride+offset]) && i < ns);
++ while (xisnan (v[i++*stride+offset]) && i < ns) {}
+ OCTAVE_LOCAL_BUFFER (double, itmp, i - 1);
+ for (unsigned int l = 0; l < i -1; l++)
+ itmp[l] = idx(l*stride + offset);
+@@ -527,7 +532,7 @@
+ else
+ {
+ unsigned int i = ns;
+- while (xisnan (v[--i*stride+offset]) && i > 0);
++ while (xisnan (v[--i*stride+offset]) && i > 0) {}
+ OCTAVE_LOCAL_BUFFER (double, itmp, ns - i - 1);
+ for (unsigned int l = 0; l < ns - i -1; l++)
+ itmp[l] = idx((l+i+1)*stride + offset);
+@@ -542,6 +547,7 @@
+ idx(l*stride + offset) = itmp[k];
+ }
+ }
++ }
+ }
+
+ retval(1) = idx;
+diff -Naur octave-2.1.73/src/file-io.cc octave-2.1.73.new/src/file-io.cc
+--- octave-2.1.73/src/file-io.cc 2006-03-20 16:11:02.000000000 -0500
++++ octave-2.1.73.new/src/file-io.cc 2008-04-18 08:56:55.000000000 -0400
+@@ -42,6 +42,7 @@
+ #include <cerrno>
+ #include <climits>
+ #include <cstdio>
++#include <cstring>
+
+ #include <iostream>
+ #include <vector>
+diff -Naur octave-2.1.73/src/oct-stream.cc octave-2.1.73.new/src/oct-stream.cc
+--- octave-2.1.73/src/oct-stream.cc 2005-05-05 15:07:24.000000000 -0400
++++ octave-2.1.73.new/src/oct-stream.cc 2008-04-18 08:56:55.000000000 -0400
+@@ -1255,7 +1255,7 @@
+ int c3 = is.get ();
+
+ if (c3 != EOF)
+-
++ {
+ if (c3 == 'f')
+ {
+ int c4 = is.get ();
+@@ -1290,6 +1290,7 @@
+
+ is >> ref;
+ }
++ }
+ }
+ else
+ {
+diff -Naur octave-2.1.73/src/ov-fcn-inline.cc octave-2.1.73.new/src/ov-fcn-inline.cc
+--- octave-2.1.73/src/ov-fcn-inline.cc 2005-05-02 07:17:16.000000000 -0400
++++ octave-2.1.73.new/src/ov-fcn-inline.cc 2008-04-18 08:56:55.000000000 -0400
+@@ -126,7 +126,7 @@
+ OSSTREAM buf;
+
+ // Skip preceeding newline(s)
+- while (is.get (c) && c == '\n');
++ while (is.get (c) && c == '\n') {}
+
+ if (is)
+ {
+diff -Naur octave-2.1.73/src/parse.y octave-2.1.73.new/src/parse.y
+--- octave-2.1.73/src/parse.y 2006-03-20 16:11:03.000000000 -0500
++++ octave-2.1.73.new/src/parse.y 2008-04-18 08:56:55.000000000 -0400
+@@ -34,6 +34,7 @@
+
+ #include <cassert>
+ #include <cstdio>
++#include <cstring>
+
+ #ifdef YYBYACC
+ #include <cstdlib>
+diff -Naur octave-2.1.73/src/pr-output.cc octave-2.1.73.new/src/pr-output.cc
+--- octave-2.1.73/src/pr-output.cc 2005-05-02 07:17:17.000000000 -0400
++++ octave-2.1.73.new/src/pr-output.cc 2008-04-18 08:56:55.000000000 -0400
+@@ -1602,7 +1602,7 @@
+ }
+
+ template <>
+-static inline void
++inline void
+ pr_plus_format (std::ostream& os, const Complex& c)
+ {
+ double rp = c.real ();
+diff -Naur octave-2.1.73/src/unwind-prot.cc octave-2.1.73.new/src/unwind-prot.cc
+--- octave-2.1.73/src/unwind-prot.cc 2005-05-02 07:17:20.000000000 -0400
++++ octave-2.1.73.new/src/unwind-prot.cc 2008-04-18 08:56:55.000000000 -0400
+@@ -30,6 +30,7 @@
+ #endif
+
+ #include <cstddef>
++#include <cstring>
+
+ #include "CMatrix.h"
+