diff --git a/ChangeLog b/ChangeLog index 51354acfd..f8c4335cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-02-07 Adam Fedor + + * 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 * Source/NSPropertyList.m: (GSBinaryPLParser -objectAtIndex:) diff --git a/Source/simple-load.h b/Source/simple-load.h index b098f1ce3..4be3e4e29 100644 --- a/Source/simple-load.h +++ b/Source/simple-load.h @@ -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 */