Mercurial > octave
changeset 30538:91642eb6420e
maint: merge stable to default.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Thu, 23 Dec 2021 19:00:12 +0100 |
parents | f69ddab4b0ec (current diff) 9e56eb717561 (diff) |
children | 773fd1dcbdbf |
files | libinterp/corefcn/oct-stream.cc src/mkoctfile.in.cc |
diffstat | 4 files changed, 20 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/oct-stream.cc Mon Sep 27 13:55:27 2021 -0500 +++ b/libinterp/corefcn/oct-stream.cc Thu Dec 23 19:00:12 2021 +0100 @@ -42,6 +42,7 @@ #include "Array.h" #include "Cell.h" #include "byte-swap.h" +#include "lo-cutils.h" #include "lo-ieee.h" #include "lo-mappers.h" #include "lo-utils.h" @@ -3897,7 +3898,7 @@ int i; int (*compare)(const char *, const char *, std::size_t); - compare = (case_sensitive ? strncmp : strncasecmp); + compare = (case_sensitive ? strncmp : octave_strncasecmp); for (i = 0; i < targets.numel (); i++) {
--- a/liboctave/external/Faddeeva/Faddeeva.cc Mon Sep 27 13:55:27 2021 -0500 +++ b/liboctave/external/Faddeeva/Faddeeva.cc Thu Dec 23 19:00:12 2021 +0100 @@ -140,6 +140,7 @@ functions near the origin. Use gnulib functions if GNULIB_NAMESPACE is defined. 18 December 2012: Slight tweaks (remove recomputation of x*x in Dawson) + 12 May 2015: Bugfix for systems lacking copysign function. */ ///////////////////////////////////////////////////////////////////////// @@ -200,11 +201,23 @@ // copysign was introduced in C++11 (and is also in POSIX and C99) # if defined(_WIN32) || defined(__WIN32__) # define copysign _copysign // of course MS had to be different +# elif defined(GNULIB_NAMESPACE) // we are using using gnulib <cmath> +# define copysign GNULIB_NAMESPACE::copysign # elif (__cplusplus < 201103L) && !defined(HAVE_COPYSIGN) && !defined(__linux__) && !(defined(__APPLE__) && defined(__MACH__)) && !defined(_AIX) -static inline double my_copysign(double x, double y) { return y<0 ? -x : x; } +static inline double my_copysign(double x, double y) { return x<0 != y<0 ? -x : x; } # define copysign my_copysign # endif +// If we are using the gnulib <cmath> (e.g. in the GNU Octave sources), +// gnulib generates a link warning if we use ::floor instead of gnulib::floor. +// This warning is completely innocuous because the only difference between +// gnulib::floor and the system ::floor (and only on ancient OSF systems) +// has to do with floor(-0), which doesn't occur in the usage below, but +// the Octave developers prefer that we silence the warning. +# ifdef GNULIB_NAMESPACE +# define floor GNULIB_NAMESPACE::floor +# endif + #else // !__cplusplus, i.e., pure C (requires C99 features) # include "Faddeeva.h"
--- a/liboctave/operators/Sparse-diag-op-defs.h Mon Sep 27 13:55:27 2021 -0500 +++ b/liboctave/operators/Sparse-diag-op-defs.h Thu Dec 23 19:00:12 2021 +0100 @@ -104,9 +104,10 @@ // FIXME: functors such as this should be gathered somewhere template <typename T> struct identity_val - : public std::unary_function <T, T> { public: + typedef T argument_type; + typedef T result_type; T operator () (const T x) { return x; } };
--- a/src/mkoctfile.in.cc Mon Sep 27 13:55:27 2021 -0500 +++ b/src/mkoctfile.in.cc Thu Dec 23 19:00:12 2021 +0100 @@ -1201,7 +1201,8 @@ std::string cmd = (vars["F77"] + " -c " + vars["FPICFLAG"] + ' ' + vars["ALL_FFLAGS"] + ' ' + incflags + ' ' + defs + ' ' - + pass_on_options + ' ' + f + " -o " + o); + + pass_on_options + ' ' + quote_path (f) + + " -o " + quote_path (o)); int status = run_command (cmd, verbose, printonly);