From: mquinson Date: Tue, 20 May 2008 23:07:40 +0000 (+0000) Subject: Second try to let the darwin linker find the environment variables X-Git-Tag: v3.3~472 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/1035915cf712d1cf12e982cefdf833f811934f05 Second try to let the darwin linker find the environment variables git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5464 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/gras/Virtu/rl_process.c b/src/gras/Virtu/rl_process.c index 032abec57d..00c2842750 100644 --- a/src/gras/Virtu/rl_process.c +++ b/src/gras/Virtu/rl_process.c @@ -19,11 +19,14 @@ XBT_EXPORT_NO_IMPORT(char const *) _gras_procname = NULL; static xbt_dict_t _process_properties = NULL; static xbt_dict_t _host_properties = NULL; -/* the environment, as specified by the opengroup, used to initialize the process properties */ -#ifdef DARWIN -# include -# define environ (*_NSGetEnviron()) -#endif +# 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 +# define environ (*_NSGetEnviron()) +# else + /* the environment, as specified by the opengroup, used to initialize the process properties */ + extern char **environ; +# endif extern char **environ;