summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorjelmer <jelmer@0c0555d6-39d7-0310-84fc-f1cc0bd64818>2007-11-06 04:26:52 +0000
committerStefan Metzmacher <metze@samba.org>2007-11-06 09:38:58 +0100
commite759ca84923cf711664e7946c10e10b991ff36ca (patch)
tree1478dfafdb5c057b20cdd6fbed74cd3bd17c8e85 /source3/lib
parent29303bd12eaf9f9845d9432c6e041d704bfc885e (diff)
downloadsamba-e759ca84923cf711664e7946c10e10b991ff36ca.tar.gz
samba-e759ca84923cf711664e7946c10e10b991ff36ca.tar.bz2
samba-e759ca84923cf711664e7946c10e10b991ff36ca.zip
Wrap native HPUX functions in dl implementation.
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@25859 0c0555d6-39d7-0310-84fc-f1cc0bd64818 (This used to be commit 0ec16729299887b4a80a7e24fbd1750632276691)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/replace/dlfcn.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source3/lib/replace/dlfcn.c b/source3/lib/replace/dlfcn.c
index 46aaaa4087..42848848e8 100644
--- a/source3/lib/replace/dlfcn.c
+++ b/source3/lib/replace/dlfcn.c
@@ -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, unsigned int flags)
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 @@ char *rep_dlerror(void)
#ifndef HAVE_DLCLOSE
int rep_dlclose(void *handle)
{
+#ifdef HAVE_SHL_CLOSE
+ return shl_unload((shl_t)handle);
+#else
return 0;
+#endif
}
#endif