summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-10-17 16:27:16 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-10-17 16:27:16 +0000
commitafae6e33dea2c95f16aa4797780b9461ba1254ff (patch)
tree9216b6aa1a3472b300a6000de2ea9d4d7b5d5b2d /hash.c
parent38f92866198ec2037a4b79f078c647a984a187e1 (diff)
* 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/branches/ruby_1_6@2970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/hash.c b/hash.c
index fddbb0129a..bb1a1fe646 100644
--- a/hash.c
+++ b/hash.c
@@ -17,6 +17,10 @@
#include "util.h"
#include "rubysig.h"
+#ifdef __APPLE__
+#include <crt_externs.h>
+#endif
+
#define HASH_DELETED FL_USER1
static void
@@ -863,6 +867,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)