aboutsummaryrefslogtreecommitdiff
path: root/packages/patches/darwin
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2005-11-26 01:52:47 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2005-11-26 01:52:47 +0000
commit6c271c12023d3aff3e5043a456b156b68042738d (patch)
tree270582907b167f8075ecac3fdb231dbc01f4b8f4 /packages/patches/darwin
parent59bc5841c63961260c70979877df3fc781f8cf30 (diff)
added in Jamie's dlopn patch so I can use his binaries; fixed a number of bugs reported on the list; added platform-specific noncvs handling
svn path=/trunk/; revision=4035
Diffstat (limited to 'packages/patches/darwin')
-rw-r--r--packages/patches/darwin/darwin_dlopen.patch65
1 files changed, 65 insertions, 0 deletions
diff --git a/packages/patches/darwin/darwin_dlopen.patch b/packages/patches/darwin/darwin_dlopen.patch
new file mode 100644
index 00000000..a93ef7ed
--- /dev/null
+++ b/packages/patches/darwin/darwin_dlopen.patch
@@ -0,0 +1,65 @@
+Index: s_loader.c
+===================================================================
+RCS file: /cvsroot/pure-data/pd/src/s_loader.c,v
+retrieving revision 1.4
+diff -u -w -r1.4 s_loader.c
+--- s_loader.c 6 Sep 2004 20:20:35 -0000 1.4
++++ s_loader.c 26 Nov 2005 00:27:11 -0000
+@@ -2,6 +2,9 @@
+ * For information on usage and redistribution, and for a DISCLAIMER OF ALL
+ * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
+
++#ifdef __APPLE__
++#define DL_OPEN
++#endif
+ #ifdef DL_OPEN
+ #include <dlfcn.h>
+ #endif
+@@ -13,7 +16,7 @@
+ #include <io.h>
+ #include <windows.h>
+ #endif
+-#ifdef MACOSX
++#ifdef MACOSX10.2
+ #include <mach-o/dyld.h>
+ #endif
+ #include <string.h>
+@@ -90,7 +93,7 @@
+ if (lastdot = strrchr(nameptr, '.'))
+ *lastdot = 0;
+
+-#ifdef MACOSX
++#ifdef MACOSX10.2
+ strcpy(symname, "_");
+ strcat(symname, nameptr);
+ #else
+@@ -122,7 +125,7 @@
+ }
+ makeout = (t_xxx)GetProcAddress(ntdll, symname);
+ #endif
+-#ifdef MACOSX
++#ifdef MACOSX10.2
+ {
+ NSObjectFileImage image;
+ void *ret;
+@@ -134,8 +137,18 @@
+ return 0;
+ }
+ ret = NSLinkModule( image, filename,
+- NSLINKMODULE_OPTION_BINDNOW + NSLINKMODULE_OPTION_PRIVATE);
+-
++ NSLINKMODULE_OPTION_BINDNOW |
++ //NSLINKMODULE_OPTION_PRIVATE |
++ NSLINKMODULE_OPTION_RETURN_ON_ERROR);
++
++ if (ret == NULL) {
++ int err;
++ const char *fname, *errt;
++ NSLinkEditErrors c;
++ NSLinkEditError(&c, &err, &fname, &errt);
++ post("link error %d %s %s", err, fname, errt);
++ return 0;
++ }
+ s = NSLookupSymbolInModule(ret, symname);
+
+ if (s)