Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill duplicate definitions, and try to ensure that MC-ready code still works without...
authorMartin Quinson <martin.quinson@loria.fr>
Wed, 8 Feb 2012 16:09:48 +0000 (17:09 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Wed, 8 Feb 2012 16:09:48 +0000 (17:09 +0100)
include/simgrid/modelchecker.h
src/include/mc/mc.h

index b0d7a37..f07d42e 100644 (file)
 #define SIMGRID_MODELCHECKER_H
 
 #ifdef HAVE_MC
 #define SIMGRID_MODELCHECKER_H
 
 #ifdef HAVE_MC
+
 extern int _surf_do_model_check;
 #define MC_IS_ENABLED _surf_do_model_check
 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();
 
 
 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 */
 #endif /* SIMGRID_MODELCHECKER_H */
index bffb7e6..10b7691 100644 (file)
 #include "xbt/function_types.h"
 #include "mc/datatypes.h"
 #include "simix/datatypes.h"
 #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"
 
 #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()
 
 
 SG_BEGIN_DECL()