# HG changeset patch # User jwe # Date 1057691695 0 # Node ID 042cdbb7f3174e836ebc77ded6783ae0f3f15628 # Parent 252b9162c084f09ceff5239eefb94d580018dc8f [project @ 2003-07-08 19:14:55 by jwe] diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,11 @@ 2003-07-08 John W. Eaton + * defun.cc (check_version): Compare version to OCTAVE_API_VERSION, + not OCTAVE_VERSION. Mismatch is now fatal. + * defun-int.h (DEFINE_FUN_INSTALLER_FUN3): Pass + OCTAVE_API_VERSION instead of OCTAVE_VERSION to check_version. + * version.h (OCTAVE_API_VERSION): New macro. + * defaults.cc (Vdefault_exec_path): New static variable. (set_default_default_exec_path): New function. (install_defaults): Call it. diff --git a/src/defun-int.h b/src/defun-int.h --- a/src/defun-int.h +++ b/src/defun-int.h @@ -87,7 +87,7 @@ bool \ FS ## name ## _ ## cxx_abi (const octave_shlib& shl) \ { \ - check_version (OCTAVE_VERSION, #name); \ + check_version (OCTAVE_API_VERSION, #name); \ install_dld_function (F ## name, #name, shl, doc); \ return error_state ? false : true; \ } diff --git a/src/defun.cc b/src/defun.cc --- a/src/defun.cc +++ b/src/defun.cc @@ -68,13 +68,13 @@ void check_version (const std::string& version, const std::string& fcn) { - if (version != OCTAVE_VERSION) + if (version != OCTAVE_API_VERSION) { - warning ("incompatible version %s found in function `%s'", - version.c_str (), fcn.c_str ()); - warning ("this can lead to incorrect results or other failures"); - warning ("you can fix this problem by recompiling this .oct file"); - + error ("API version %s found in .oct file function `%s'\n" + " does not match the running Octave (API version %s)\n" + " this can lead to incorrect results or other failures\n" + " you can fix this problem by recompiling this .oct file", + version.c_str (), fcn.c_str (), OCTAVE_API_VERSION); } } diff --git a/src/version.h b/src/version.h --- a/src/version.h +++ b/src/version.h @@ -25,6 +25,8 @@ #define OCTAVE_VERSION "2.1.50" +#define OCTAVE_API_VERSION "1" + #define OCTAVE_COPYRIGHT \ "Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 John W. Eaton."