fix environ on MAC

This commit is contained in:
Vitor Santos Costa
2010-06-18 10:32:57 +01:00
parent 3fcf5f5ced
commit 53773207f4
2 changed files with 13 additions and 9 deletions

View File

@@ -247,7 +247,11 @@ pl_environ(term_t l)
term_t vt = PL_new_term_ref();
functor_t FUNCTOR_equal2 = PL_new_functor(PL_new_atom("="), 2);
#if HAVE__NSGETENVIRON
for(e = _NSGetEnviron(); *e; e++)
#else
for(e = environ; *e; e++)
#endif
{ char *s = strchr(*e, '=');
if ( !s )