patch the darwin gmodule implementation to recursively look up symbols

like the elf one does
This commit is contained in:
danw 2003-09-27 20:18:37 +00:00
parent a2fc21eebf
commit 7b641047ce
3 changed files with 23 additions and 2 deletions

View file

@ -1,6 +1,7 @@
# $NetBSD: Makefile,v 1.29 2003/08/27 09:06:12 wiz Exp $
# $NetBSD: Makefile,v 1.30 2003/09/27 20:18:37 danw Exp $
DISTNAME= glib-2.2.3
PKGREVISION= 1
PKGNAME= ${DISTNAME:S/glib/glib2/}
CATEGORIES= devel
MASTER_SITES= ftp://ftp.gtk.org/pub/gtk/v2.2/ \

View file

@ -1,7 +1,8 @@
$NetBSD: distinfo,v 1.18 2003/08/27 09:06:12 wiz Exp $
$NetBSD: distinfo,v 1.19 2003/09/27 20:18:37 danw Exp $
SHA1 (glib-2.2.3.tar.bz2) = 05580cbe110b94dd5020a07cf6d380190a2a13af
Size (glib-2.2.3.tar.bz2) = 1636987 bytes
SHA1 (patch-aa) = 6f1a12477763df0edcffd58819e2319f2bfbef4a
SHA1 (patch-ab) = cf7fd8b57974a01a718ccacb622f874993034de2
SHA1 (patch-ac) = 6e97c0b3360609f0a4f0f74cd5060f4068364933
SHA1 (patch-ad) = 13c4bdafc931b8db5d9f83a0035db2244c5be1d1

View file

@ -0,0 +1,19 @@
$NetBSD: patch-ad,v 1.6 2003/09/27 20:18:37 danw Exp $
--- gmodule/gmodule-dyld.c.orig Sat Sep 6 13:23:40 2003
+++ gmodule/gmodule-dyld.c Sat Sep 6 13:24:35 2003
@@ -116,7 +116,13 @@
if (NSIsSymbolNameDefined (symbol_name))
sym = NSLookupAndBindSymbol (symbol_name);
else
- sym = NULL;
+ {
+ GModule *mod;
+ for (mod = modules, sym = NULL; mod && !sym; mod = mod->next)
+ {
+ sym = NSLookupSymbolInModule (mod->handle, symbol_name);
+ }
+ }
}
else
sym = NSLookupSymbolInModule (handle, symbol_name);