Author: jelmer Date: 2007-11-06 04:26:52 +0000 (Tue, 06 Nov 2007) New Revision: 25859
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=25859 Log: Wrap native HPUX functions in dl implementation. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/lib/replace/dlfcn.c Changeset: Property changes on: branches/SAMBA_4_0 ___________________________________________________________________ Name: bzr:revision-info ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/lib/replace/dlfcn.c =================================================================== --- branches/SAMBA_4_0/source/lib/replace/dlfcn.c 2007-11-06 04:26:47 UTC (rev 25858) +++ branches/SAMBA_4_0/source/lib/replace/dlfcn.c 2007-11-06 04:26:52 UTC (rev 25859) @@ -23,6 +23,9 @@ */ #include "replace.h" +#ifdef HAVE_DL_H +#include <dl.h> +#endif #ifndef HAVE_DLOPEN #ifdef DLOPEN_TAKES_UNSIGNED_FLAGS @@ -31,13 +34,22 @@ void *rep_dlopen(const char *name, int flags) #endif { +#ifdef HAVE_SHL_LOAD + return (void *)shl_load(name, flags, 0); +#else return NULL; +#endif } #endif #ifndef HAVE_DLSYM void *rep_dlsym(void *handle, const char *symbol) { +#ifdef HAVE_SHL_FINDSYM + void *sym_addr; + if (!shl_findsym((shl_t *)&handle, symbol, TYPE_UNDEFINED, &sym_addr)) + return sym_addr; +#endif return NULL; } #endif @@ -52,6 +64,10 @@ #ifndef HAVE_DLCLOSE int rep_dlclose(void *handle) { +#ifdef HAVE_SHL_CLOSE + return shl_unload((shl_t)handle); +#else return 0; +#endif } #endif
