summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-11-01 03:49:49 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-11-01 03:49:49 +0100
commit7b186c48d365ae8eda81ae9a0af100d2214bee32 (patch)
tree9a49d17f6529a218f4d8e7879714e4dae2c001c3 /source3/lib
parent6a2caa34b24c2225dba9da011eaa5cc3eb8752be (diff)
downloadsamba-7b186c48d365ae8eda81ae9a0af100d2214bee32.tar.gz
samba-7b186c48d365ae8eda81ae9a0af100d2214bee32.tar.bz2
samba-7b186c48d365ae8eda81ae9a0af100d2214bee32.zip
Remove sys_dl*() - stubs are already provided by libreplace.
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/module.c16
-rw-r--r--source3/lib/system.c40
2 files changed, 8 insertions, 48 deletions
diff --git a/source3/lib/module.c b/source3/lib/module.c
index 76983387ff..de13668009 100644
--- a/source3/lib/module.c
+++ b/source3/lib/module.c
@@ -37,11 +37,11 @@ static NTSTATUS do_smb_load_module(const char *module_name, bool is_probe)
* backwards compatibility, there might be symbols in the
* plugin referencing to old (removed) functions
*/
- handle = sys_dlopen(module_name, RTLD_LAZY);
+ handle = dlopen(module_name, RTLD_LAZY);
/* This call should reset any possible non-fatal errors that
occured since last call to dl* functions */
- error = sys_dlerror();
+ error = dlerror();
if(!handle) {
int level = is_probe ? 3 : 0;
@@ -49,15 +49,15 @@ static NTSTATUS do_smb_load_module(const char *module_name, bool is_probe)
return NT_STATUS_UNSUCCESSFUL;
}
- init = (init_module_function *)sys_dlsym(handle, "init_samba_module");
+ init = (init_module_function *)dlsym(handle, "init_samba_module");
- /* we must check sys_dlerror() to determine if it worked, because
- sys_dlsym() can validly return NULL */
- error = sys_dlerror();
+ /* we must check dlerror() to determine if it worked, because
+ dlsym() can validly return NULL */
+ error = dlerror();
if (error) {
DEBUG(0, ("Error trying to resolve symbol 'init_samba_module' "
"in %s: %s\n", module_name, error));
- sys_dlclose(handle);
+ dlclose(handle);
return NT_STATUS_UNSUCCESSFUL;
}
@@ -67,7 +67,7 @@ static NTSTATUS do_smb_load_module(const char *module_name, bool is_probe)
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("Module '%s' initialization failed: %s\n",
module_name, get_friendly_nt_error_msg(status)));
- sys_dlclose(handle);
+ dlclose(handle);
}
return status;
diff --git a/source3/lib/system.c b/source3/lib/system.c
index d23e7ae6db..90dbdafa92 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -1190,46 +1190,6 @@ int sys_pclose(int fd)
return wstatus;
}
-/**************************************************************************
- Wrappers for dlopen, dlsym, dlclose.
-****************************************************************************/
-
-void *sys_dlopen(const char *name, int flags)
-{
-#if defined(HAVE_DLOPEN)
- return dlopen(name, flags);
-#else
- return NULL;
-#endif
-}
-
-void *sys_dlsym(void *handle, const char *symbol)
-{
-#if defined(HAVE_DLSYM)
- return dlsym(handle, symbol);
-#else
- return NULL;
-#endif
-}
-
-int sys_dlclose (void *handle)
-{
-#if defined(HAVE_DLCLOSE)
- return dlclose(handle);
-#else
- return 0;
-#endif
-}
-
-const char *sys_dlerror(void)
-{
-#if defined(HAVE_DLERROR)
- return dlerror();
-#else
- return NULL;
-#endif
-}
-
int sys_dup2(int oldfd, int newfd)
{
#if defined(HAVE_DUP2)