octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Compilation fixes: remove extern template and add declarations.


From: Jason Riedy
Subject: [PATCH] Compilation fixes: remove extern template and add declarations.
Date: Tue, 12 Feb 2008 13:04:59 -0800
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux)

The template <> extern bool... declarations in Array.cc use an
extension that isn't accepted by g++-4.3.  I don't know what the
intent was.

Also, oct-sort.cc uses memcpy and memmove without declarations.
---
   I don't know how these relate to all the other sort-related
   problems going on, but these were necessary for the g++ 4.3 in
   Debian's experimental archive. -- Jason

 liboctave/Array.cc    |    8 ++++----
 liboctave/ChangeLog   |    9 +++++++++
 liboctave/oct-sort.cc |    3 +++
 3 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/liboctave/Array.cc b/liboctave/Array.cc
index d59f469..284c2b9 100644
--- a/liboctave/Array.cc
+++ b/liboctave/Array.cc
@@ -2636,13 +2636,13 @@ Array<T>::sort (Array<octave_idx_type> &sidx, 
octave_idx_type dim,
 #if defined (HAVE_IEEE754_DATA_FORMAT)
 
 template <>
-extern bool ascending_compare (double, double);
+bool ascending_compare (double, double);
 template <>
-extern bool ascending_compare (vec_index<double>*, vec_index<double>*);
+bool ascending_compare (vec_index<double>*, vec_index<double>*);
 template <>
-extern bool descending_compare (double, double);
+bool descending_compare (double, double);
 template <>
-extern bool descending_compare (vec_index<double>*, vec_index<double>*);
+bool descending_compare (vec_index<double>*, vec_index<double>*);
 
 template <>
 Array<double> Array<double>::sort (octave_idx_type dim, sortmode mode) const;
diff --git a/liboctave/ChangeLog b/liboctave/ChangeLog
index b9b9b6a..90e6b39 100644
--- a/liboctave/ChangeLog
+++ b/liboctave/ChangeLog
@@ -1,3 +1,12 @@
+2008-02-12  Jason Riedy  <address@hidden>
+
+       * oct-sort.cc: Include cstring and import memcpy and memmove.
+
+2008-02-12  Jason Riedy  <address@hidden>
+
+       * Array.cc (ascending_compare, descending_compare): Remove
+       non-standard extern in the instantiations.
+
 2008-02-12  John W. Eaton  <address@hidden>
 
        * Range.cc (Range::sort_internal): Avoid shadow warning from gcc.
diff --git a/liboctave/oct-sort.cc b/liboctave/oct-sort.cc
index 6da66f6..f1e0abc 100644
--- a/liboctave/oct-sort.cc
+++ b/liboctave/oct-sort.cc
@@ -85,6 +85,9 @@ The Python license is
 
 #include <cassert>
 #include <cstdlib>
+#include <cstring>
+using std::memcpy;
+using std::memmove;
 
 #include "lo-mappers.h"
 #include "quit.h"
-- 
1.5.4.1



reply via email to

[Prev in Thread] Current Thread [Next in Thread]