[#536] SEVG in bignum.c:505... — Sean Chittenden <sean@...>
$ ruby -e 'p [].to_s.strip.to_i'
5 messages
2002/10/13
[#537] darwin shared library patch — Eric Melville <eric@...>
In Darwin, the preferred way to build shared libraries is with two level
9 messages
2002/10/13
[#539] Re: darwin shared library patch
— "Akinori MUSHA" <knu@...>
2002/10/13
Hi,
[#544] Re: darwin shared library patch
— Eric Melville <eric@...>
2002/10/16
> The patch seems to make ENV[]= coredump.
[#546] Re: darwin shared library patch
— "Akinori MUSHA" <knu@...>
2002/10/16
At Thu, 17 Oct 2002 01:41:49 +0900,
[#541] Patch for MacOS X dln.c — Luc B駘anger <belanglu@...>
I have a patch for the dynamic linker in MacOS X, which permit to load
7 messages
2002/10/13
darwin shared library patch
From:
Eric Melville <eric@...>
Date:
2002-10-13 18:00:30 UTC
List:
ruby-core #537
In Darwin, the preferred way to build shared libraries is with two level
namespaces. The following patch makes it possible to build the ruby shared
library in this fashion.
I would really like to see this integrated. This patch was created against
the 1.6 source. If a patch against the 1.7 source is needed, please let me
know.
diff -ruN ruby.orig/eval.c ruby/eval.c
--- ruby.orig/eval.c Mon May 27 10:59:43 2002
+++ ruby/eval.c Fri Oct 11 12:51:54 2002
@@ -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
@@ -1008,6 +1012,8 @@
#ifdef __MACOS__
rb_origenviron = 0;
+#elif defined(__APPLE__)
+ rb_origenviron = *_NSGetEnviron();
#else
rb_origenviron = environ;
#endif
diff -ruN ruby.orig/hash.c ruby/hash.c
--- ruby.orig/hash.c Mon May 27 10:59:43 2002
+++ ruby/hash.c Fri Oct 11 12:51:48 2002
@@ -17,6 +17,10 @@
#include "util.h"
#include "rubysig.h"
+#ifdef __APPLE__
+#include <crt_externs.h>
+#endif
+
#define HASH_DELETED FL_USER1
static void
@@ -861,6 +865,11 @@
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)