Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
let's try to please windows
authorAugustin Degomme <augustin.degomme@imag.fr>
Tue, 2 Dec 2014 17:20:13 +0000 (18:20 +0100)
committerAugustin Degomme <augustin.degomme@imag.fr>
Tue, 2 Dec 2014 17:20:13 +0000 (18:20 +0100)
include/simgrid/modelchecker.h
src/mc/mc_base.c
src/mc/mc_base.h
src/mc/mc_global.c

index 6fe5c2c..0d41344 100644 (file)
@@ -52,7 +52,7 @@ XBT_PUBLIC(void) MC_ignore(void *addr, size_t size);
  *
  *  This is a path as generated by `MC_record_stack_to_string()`.
  */
  *
  *  This is a path as generated by `MC_record_stack_to_string()`.
  */
-extern char* MC_record_path;
+XBT_PUBLIC_DATA(char*) MC_record_path;
 
 /** Whether the replay mode is enabled */
 static inline bool MC_record_replay_is_active(void) {
 
 /** Whether the replay mode is enabled */
 static inline bool MC_record_replay_is_active(void) {
index bd43d7a..82ca8c6 100644 (file)
@@ -101,7 +101,11 @@ static int prng_random(int min, int max)
   // Use rejection in order to avoid skew
   long x;
   do {
   // Use rejection in order to avoid skew
   long x;
   do {
+#ifndef _XBT_WIN32
     x = random();
     x = random();
+#else
+    x = rand();
+#endif
   } while( x >= accept_size );
   return min + (x % output_size);
 }
   } while( x >= accept_size );
   return min + (x % output_size);
 }
index 34852e4..c462414 100644 (file)
@@ -9,7 +9,7 @@
 
 #include <simgrid/simix.h>
 #include "simgrid_config.h"
 
 #include <simgrid/simix.h>
 #include "simgrid_config.h"
-
+#include "internal_config.h"
 #include "../simix/smx_private.h"
 
 SG_BEGIN_DECL()
 #include "../simix/smx_private.h"
 
 SG_BEGIN_DECL()
index ec5e3c3..d2a2e5e 100644 (file)
@@ -4,6 +4,8 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
+
+#ifndef _XBT_WIN32
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/wait.h>
@@ -13,6 +15,7 @@
 
 #define UNW_LOCAL_ONLY
 #include <libunwind.h>
 
 #define UNW_LOCAL_ONLY
 #include <libunwind.h>
+#endif
 
 #include "simgrid/sg_config.h"
 #include "../surf/surf_private.h"
 
 #include "simgrid/sg_config.h"
 #include "../surf/surf_private.h"