# HG changeset patch # User Jason Riedy # Date 1202878833 18000 # Node ID 93826ba0d07898c881df59c7ad9d3df2597ea4c5 # Parent 3018354c554cd5bf9fa205aebecc151bcfaafcfa compilation fixes diff --git a/liboctave/Array.cc b/liboctave/Array.cc --- a/liboctave/Array.cc +++ b/liboctave/Array.cc @@ -2636,13 +2636,13 @@ #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*, vec_index*); +bool ascending_compare (vec_index*, vec_index*); template <> -extern bool descending_compare (double, double); +bool descending_compare (double, double); template <> -extern bool descending_compare (vec_index*, vec_index*); +bool descending_compare (vec_index*, vec_index*); template <> Array Array::sort (octave_idx_type dim, sortmode mode) const; diff --git a/liboctave/ChangeLog b/liboctave/ChangeLog --- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -5,6 +5,11 @@ 2008-02-12 Jason Riedy + * Array.cc (ascending_compare, descending_compare): Remove + non-standard extern in the instantiations. + + * oct-sort.cc: Include and sprinkle with std:: as needed. + * dMatrix.cc (ILAENV): Declare LAPACK Fortran function. (Matrix::lssolve): Use ILAENV to query smlsiz. And add an ugly workaround for DGELSD's broken lwork query. The formula is from diff --git a/liboctave/oct-sort.cc b/liboctave/oct-sort.cc --- a/liboctave/oct-sort.cc +++ b/liboctave/oct-sort.cc @@ -85,6 +85,7 @@ #include #include +#include #include "lo-mappers.h" #include "quit.h" @@ -521,7 +522,7 @@ if (MERGE_GETMEM (na) < 0) return -1; - memcpy (ms.a, pa, na * sizeof (T)); + std::memcpy (ms.a, pa, na * sizeof (T)); dest = pa; pa = ms.a; @@ -583,7 +584,7 @@ { if (k < 0) goto Fail; - memcpy (dest, pa, k * sizeof (T)); + std::memcpy (dest, pa, k * sizeof (T)); dest += k; pa += k; na -= k; @@ -607,7 +608,7 @@ { if (k < 0) goto Fail; - memmove (dest, pb, k * sizeof (T)); + std::memmove (dest, pb, k * sizeof (T)); dest += k; pb += k; nb -= k; @@ -630,12 +631,12 @@ Fail: if (na) - memcpy (dest, pa, na * sizeof (T)); + std::memcpy (dest, pa, na * sizeof (T)); return result; CopyB: /* The last element of pa belongs at the end of the merge. */ - memmove (dest, pb, nb * sizeof (T)); + std::memmove (dest, pb, nb * sizeof (T)); dest[nb] = *pa; return 0; @@ -661,7 +662,7 @@ if (MERGE_GETMEM (nb) < 0) return -1; dest = pb + nb - 1; - memcpy (ms.a, pb, nb * sizeof (T)); + std::memcpy (ms.a, pb, nb * sizeof (T)); basea = pa; baseb = ms.a; pb = ms.a + nb - 1; @@ -727,7 +728,7 @@ { dest -= k; pa -= k; - memmove (dest+1, pa+1, k * sizeof (T)); + std::memmove (dest+1, pa+1, k * sizeof (T)); na -= k; if (na == 0) goto Succeed; @@ -746,7 +747,7 @@ { dest -= k; pb -= k; - memcpy (dest+1, pb+1, k * sizeof (T)); + std::memcpy (dest+1, pb+1, k * sizeof (T)); nb -= k; if (nb == 1) goto CopyA; @@ -771,14 +772,14 @@ Fail: if (nb) - memcpy (dest-(nb-1), baseb, nb * sizeof (T)); + std::memcpy (dest-(nb-1), baseb, nb * sizeof (T)); return result; CopyA: /* The first element of pb belongs at the front of the merge. */ dest -= na; pa -= na; - memmove (dest+1, pa+1, na * sizeof (T)); + std::memmove (dest+1, pa+1, na * sizeof (T)); *dest = *pb; return 0;