Module: wine Branch: master Commit: cf19a7ac4f6c01d2ac9516b5691a420b73fd1673 URL: https://source.winehq.org/git/wine.git/?a=commit;h=cf19a7ac4f6c01d2ac9516b56...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Apr 6 11:47:56 2020 +0200
mountmgr.sys: Use standard dlopen() instead of the libwine wrappers.
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/mountmgr.sys/dbus.c | 17 +++++++---------- dlls/mountmgr.sys/mountmgr.c | 1 - 2 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/dlls/mountmgr.sys/dbus.c b/dlls/mountmgr.sys/dbus.c index c6d5d0b7af..27b35acd9c 100644 --- a/dlls/mountmgr.sys/dbus.c +++ b/dlls/mountmgr.sys/dbus.c @@ -44,7 +44,6 @@ #include "ip2string.h" #include "dhcpcsdk.h"
-#include "wine/library.h" #include "wine/exception.h" #include "wine/debug.h"
@@ -116,20 +115,19 @@ HAL_FUNCS; static BOOL load_hal_functions(void) { void *hal_handle; - char error[128];
/* Load libhal with RTLD_GLOBAL so that the dbus symbols are available. * We can't load libdbus directly since libhal may have been built against a * different version but with the same soname. Binary compatibility is for wimps. */
- if (!(hal_handle = wine_dlopen(SONAME_LIBHAL, RTLD_NOW|RTLD_GLOBAL, error, sizeof(error)))) + if (!(hal_handle = dlopen( SONAME_LIBHAL, RTLD_NOW | RTLD_GLOBAL ))) goto failed;
-#define DO_FUNC(f) if (!(p_##f = wine_dlsym( RTLD_DEFAULT, #f, error, sizeof(error) ))) goto failed +#define DO_FUNC(f) if (!(p_##f = dlsym( RTLD_DEFAULT, #f ))) goto failed DBUS_FUNCS; #undef DO_FUNC
-#define DO_FUNC(f) if (!(p_##f = wine_dlsym( hal_handle, #f, error, sizeof(error) ))) goto failed +#define DO_FUNC(f) if (!(p_##f = dlsym( hal_handle, #f ))) goto failed HAL_FUNCS; #undef DO_FUNC
@@ -137,7 +135,7 @@ static BOOL load_hal_functions(void) return TRUE;
failed: - WARN( "failed to load HAL support: %s\n", error ); + WARN( "failed to load HAL support: %s\n", dlerror() ); return FALSE; }
@@ -185,18 +183,17 @@ static GUID *parse_uuid( GUID *guid, const char *str ) static BOOL load_dbus_functions(void) { void *handle; - char error[128];
- if (!(handle = wine_dlopen(SONAME_LIBDBUS_1, RTLD_NOW, error, sizeof(error)))) + if (!(handle = dlopen( SONAME_LIBDBUS_1, RTLD_NOW ))) goto failed;
-#define DO_FUNC(f) if (!(p_##f = wine_dlsym( handle, #f, error, sizeof(error) ))) goto failed +#define DO_FUNC(f) if (!(p_##f = dlsym( handle, #f ))) goto failed DBUS_FUNCS; #undef DO_FUNC return TRUE;
failed: - WARN( "failed to load DBUS support: %s\n", error ); + WARN( "failed to load DBUS support: %s\n", dlerror() ); return FALSE; }
diff --git a/dlls/mountmgr.sys/mountmgr.c b/dlls/mountmgr.sys/mountmgr.c index 3d84af47a6..21712dc9ce 100644 --- a/dlls/mountmgr.sys/mountmgr.c +++ b/dlls/mountmgr.sys/mountmgr.c @@ -34,7 +34,6 @@
#include "mountmgr.h" #include "winreg.h" -#include "wine/library.h" #include "wine/list.h" #include "wine/unicode.h" #include "wine/debug.h"