From bcb27e07767451744d34beddf915418037527d57 Mon Sep 17 00:00:00 2001 From: "Steven G. Johnson" Date: Thu, 26 Jul 2018 13:07:38 -0400 Subject: [PATCH] compatibility with octave < 4.2 --- src/octave/nlopt_optimize-oct.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/octave/nlopt_optimize-oct.cc b/src/octave/nlopt_optimize-oct.cc index 44515b7..e515119 100644 --- a/src/octave/nlopt_optimize-oct.cc +++ b/src/octave/nlopt_optimize-oct.cc @@ -34,6 +34,11 @@ #if OCTAVE_MAJOR_VERSION < 3 || (OCTAVE_MAJOR_VERSION == 3 && OCTAVE_MINOR_VERSION < 8) # define octave_map Octave_map #endif +#if OCTAVE_MAJOR_VERSION < 4 || (OCTAVE_MAJOR_VERSION == 4 && OCTAVE_MINOR_VERSION < 2) +# define err_user_supplied_eval gripe_user_supplied_eval +# define err_user_returned_invalid gripe_user_returned_invalid +# define numel length +#endif static int struct_val_default(octave_map &m, const std::string& k, int dflt) -- 2.30.2