Fix get_symbol_path problems

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@18555 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fedor 2004-02-08 04:08:00 +00:00
parent 099e690650
commit 3741a465fb
2 changed files with 11 additions and 6 deletions

View file

@ -1,3 +1,9 @@
2004-02-07 Adam Fedor <fedor@gnu.org>
* Source/simple-load.h (__objc_dynamic_get_symbol_path): Remove
ifdefs since dladdr is assured to be present. Set handle to default
if not specified.
2004-02-04 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSPropertyList.m: (GSBinaryPLParser -objectAtIndex:)

View file

@ -88,13 +88,15 @@ __objc_dynamic_list_undefined_symbols(void)
return NULL;
}
static char *
static const char *
__objc_dynamic_get_symbol_path(dl_handle_t handle, dl_symbol_t symbol)
{
#ifdef HAVE_DLADDR
dl_symbol_t sym;
Dl_info info;
if (handle == 0)
handle = RTLD_DEFAULT;
sym = dlsym(handle, symbol);
if (!sym)
@ -104,9 +106,6 @@ __objc_dynamic_get_symbol_path(dl_handle_t handle, dl_symbol_t symbol)
return NULL;
return info.dli_fname;
#else
return NULL;
#endif
}
#endif /* __sunos_load_h_INCLUDE */
#endif /* __simple_load_h_INCLUDE */