summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-10-17 16:13:44 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-10-17 16:13:44 +0000
commit6dfb5aa6ac5c9432ad7a7b8bebda4916004051b6 (patch)
treef62049451f68c0a2ae407349faa4a9f53e61e0df /eval.c
parent9dce0d8f0b1cd52fee0a9ddad61fa63d8c83c829 (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/trunk@2969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 31a7cae5d8..207e6b464e 100644
--- a/eval.c
+++ b/eval.c
@@ -23,6 +23,10 @@
#include "st.h"
#include "dln.h"
+#ifdef __APPLE__
+#include <crt_externs.h>
+#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;