From: Martin Quinson Date: Wed, 8 Feb 2012 16:09:48 +0000 (+0100) Subject: kill duplicate definitions, and try to ensure that MC-ready code still works without... X-Git-Tag: exp_20120216~43 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/9b9d42cca1f785ac3335eb4fe61ac8ef71392ccd kill duplicate definitions, and try to ensure that MC-ready code still works without MC (closes #13813 on gforge) --- diff --git a/include/simgrid/modelchecker.h b/include/simgrid/modelchecker.h index b0d7a37042..f07d42e409 100644 --- a/include/simgrid/modelchecker.h +++ b/include/simgrid/modelchecker.h @@ -12,16 +12,23 @@ #define SIMGRID_MODELCHECKER_H #ifdef HAVE_MC + extern int _surf_do_model_check; #define MC_IS_ENABLED _surf_do_model_check -#else -#define MC_IS_ENABLED 0 -#endif - XBT_PUBLIC(void) MC_assert(int); XBT_PUBLIC(void) MC_assert_stateful(int); XBT_PUBLIC(int) MC_random(int min, int max); XBT_PUBLIC(void) MC_diff(); +#else + +#define MC_IS_ENABLED 0 +#define MC_assert(a) xbt_assert(a) +#define MC_assert_stateful(a) xbt_assert(a) + +#endif + + + #endif /* SIMGRID_MODELCHECKER_H */ diff --git a/src/include/mc/mc.h b/src/include/mc/mc.h index bffb7e6b50..10b7691393 100644 --- a/src/include/mc/mc.h +++ b/src/include/mc/mc.h @@ -12,15 +12,9 @@ #include "xbt/function_types.h" #include "mc/datatypes.h" #include "simix/datatypes.h" -#include "gras_config.h" /* Definition of HAVE_MC */ +#include "simgrid/modelchecker.h" /* our public interface (and definition of HAVE_MC) */ #include "xbt/automaton.h" -#ifdef HAVE_MC -extern int _surf_do_model_check; -#define MC_IS_ENABLED _surf_do_model_check -#else -#define MC_IS_ENABLED 0 -#endif SG_BEGIN_DECL()