Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
If it is a win plateform we have to use wenvironment against environment.
[simgrid.git] / src / gras / Virtu / rl_process.c
index c53275d..e863eb3 100644 (file)
@@ -19,12 +19,16 @@ XBT_EXPORT_NO_IMPORT(char const *) _gras_procname = NULL;
      static xbt_dict_t _host_properties = NULL;
 
 # ifdef __APPLE__
-/* under darwin, the environment gets added to the process at startup time. So, it's not defined at library link time, forcing us to extra tricks */
-# include <crt_externs.h>
-# define environ (*_NSGetEnviron())
+       /* under darwin, the environment gets added to the process at startup time. So, it's not defined at library link time, forcing us to extra tricks */
+       # include <crt_externs.h>
+       # define environ (*_NSGetEnviron())
 # else
- /* the environment, as specified by the opengroup, used to initialize the process properties */
-     extern char **environ;
+       #ifdef WIN32
+                /* the environment, as specified by the opengroup, used to initialize the process properties */
+                extern char **wenviron;
+       #else
+                extern char **environ;
+       #endif
 # endif
 
      void gras_process_init()