From 03f2c65ab25341a03e6b59eb6b84be2e4e9e6c89 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: http://svn.ruby-lang.org/repos/ruby/trunk@2969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- eval.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'eval.c') diff --git a/eval.c b/eval.c index 31a7cae5d..207e6b464 100644 --- a/eval.c +++ b/eval.c @@ -23,6 +23,10 @@ #include "st.h" #include "dln.h" +#ifdef __APPLE__ +#include +#endif + /* Make alloca work the best possible way. */ #ifdef __GNUC__ # ifndef atarist @@ -1040,7 +1044,9 @@ error_print() } } -#if !defined(NT) && !defined(__MACOS__) +#if defined(__APPLE__) +#define environ (*_NSGetEnviron()) +#elif !defined(NT) && !defined(__MACOS__) extern char **environ; #endif char **rb_origenviron; -- cgit