From 6dfb5aa6ac5c9432ad7a7b8bebda4916004051b6 Mon Sep 17 00:00:00 2001 From: knu Date: Thu, 17 Oct 2002 16:13:44 +0000 Subject: * hash.c, eval.c: Use (*_NSGetEnviron()) instead of environ on Darwin for namespace cleanness. [ruby-core:00537] * dln.c (dln_load): Fix Darwin support that has been disabled and switch to using it on Darwin instead of the system dlopen(). [ruby-core:00541] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- hash.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'hash.c') diff --git a/hash.c b/hash.c index 69ca1db4e3..d759afd296 100644 --- a/hash.c +++ b/hash.c @@ -17,6 +17,10 @@ #include "util.h" #include "rubysig.h" +#ifdef __APPLE__ +#include +#endif + #define HASH_DELETED FL_USER1 #define HASH_PROC_DEFAULT FL_USER2 @@ -944,6 +948,11 @@ static char **origenviron; static char **my_environ; #undef environ #define environ my_environ +#elif defined(__APPLE__) +#undef environ +#define environ (*_NSGetEnviron()) +#define GET_ENVIRON(e) (e) +#define FREE_ENVIRON(e) #else extern char **environ; #define GET_ENVIRON(e) (e) -- cgit v1.2.3