diff options
author | Jeremy Allison <jra@samba.org> | 2001-03-19 07:08:02 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-03-19 07:08:02 +0000 |
commit | 49f0e7e7143f82bce9dfd8b06e9e515bc0869ab7 (patch) | |
tree | 415a1bbd5e31add9ee1e7749768c00504fd7a56d /source/lib/system.c | |
parent | 4ec971e905cefada5f3980a25781730acdbf4469 (diff) | |
download | samba-49f0e7e7143f82bce9dfd8b06e9e515bc0869ab7.tar.gz samba-49f0e7e7143f82bce9dfd8b06e9e515bc0869ab7.tar.xz samba-49f0e7e7143f82bce9dfd8b06e9e515bc0869ab7.zip |
Added sys_dlopen/sys_dlsym/sys_dlclose.
Jeremy.
Diffstat (limited to 'source/lib/system.c')
-rw-r--r-- | source/lib/system.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/source/lib/system.c b/source/lib/system.c index 38b2e79ac62..91f4f8a333b 100644 --- a/source/lib/system.c +++ b/source/lib/system.c @@ -1081,3 +1081,34 @@ int sys_pclose(int fd) return -1; return wstatus; } + +/************************************************************************** + Wrappers for dlopen, dlsym, dlclose. +****************************************************************************/ + +void *sys_dlopen(const char *name, int flags) +{ +#ifdef HAVE_LIBDL + return dlopen(name, flags); +#else + return NULL; +#endif +} + +void *sys_dlsym(void *handle, char *symbol) +{ +#ifdef HAVE_LIBDL + return dlsym(handle, symbol); +#else + return NULL; +#endif +} + +int sys_dlclose (void *handle) +{ +#ifdef HAVE_LIBDL + return dlclose(handle); +#else + return 0; +#endif +} |