aboutsummaryrefslogtreecommitdiffstats
path: root/cipher/dynload.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>1999-06-26 10:23:06 +0000
committerWerner Koch <[email protected]>1999-06-26 10:23:06 +0000
commit080c9ca49f4d0b0aa07e00e1eb84bc39bf4c8562 (patch)
tree7d387cb3da17d9b3e25aef7f85acbad21f75be7f /cipher/dynload.c
parentSee ChangeLog: Wed Jun 16 20:16:21 CEST 1999 Werner Koch (diff)
downloadgnupg-080c9ca49f4d0b0aa07e00e1eb84bc39bf4c8562.tar.gz
gnupg-080c9ca49f4d0b0aa07e00e1eb84bc39bf4c8562.zip
See ChangeLog: Sat Jun 26 12:15:59 CEST 1999 Werner Koch
Diffstat (limited to 'cipher/dynload.c')
-rw-r--r--cipher/dynload.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/cipher/dynload.c b/cipher/dynload.c
index 6caeb063c..e2c988e02 100644
--- a/cipher/dynload.c
+++ b/cipher/dynload.c
@@ -27,6 +27,9 @@
#include <dlfcn.h>
#elif defined(HAVE_DLD_DLD_LINK)
#include <dld.h>
+#elif defined(HAVE_DL_SHL_LOAD)
+ #include <dl.h>
+ #include <errno.h>
#endif
#include "util.h"
#include "cipher.h"
@@ -45,6 +48,27 @@
#define RTLD_NOW 1
#endif
+#ifdef HAVE_DL_SHL_LOAD /* HPUX has shl_load instead of dlopen */
+#define HAVE_DL_DLOPEN
+#define dlopen(PATHNAME,MODE) \
+ ((void *) shl_load(PATHNAME, DYNAMIC_PATH | \
+ (((MODE) & RTLD_NOW) ? BIND_IMMEDIATE : BIND_DEFERRED), 0L))
+#define dlclose(HANDLE) shl_unload((shl_t) (HANDLE))
+#define dlerror() (errno == 0 ? NULL : strerror(errno))
+
+static void *
+dlsym(void *handle, char *name)
+{
+ void *addr;
+ if (shl_findsym((shl_t *)&handle,name,(short)TYPE_UNDEFINED,&addr) != 0) {
+ return NULL;
+ }
+ return addr;
+}
+#endif /*HAVE_DL_SHL_LOAD*/
+
+
+
typedef struct ext_list {
struct ext_list *next;
int internal;