-void gras_process_init() {
- _gras_procdata=xbt_new0(gras_procdata_t,1);
+# 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())
+# else
+ #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()
+{
+ char **env_iter;
+ _gras_procdata = xbt_new0(gras_procdata_t, 1);