From: Steven G. Johnson Date: Thu, 26 Jul 2018 17:07:38 +0000 (-0400) Subject: compatibility with octave < 4.2 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=bcb27e07767451744d34beddf915418037527d57;p=nlopt.git compatibility with octave < 4.2 --- 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)