Alexandre Julliard : netapi32: Use standard dlopen() instead of the libwine wrappers.

Alexandre Julliard julliard at winehq.org
Tue Apr 7 15:27:14 CDT 2020


Module: wine
Branch: master
Commit: 1938ddc65181642d68022784c3e3732c536db4c1
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=1938ddc65181642d68022784c3e3732c536db4c1

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Apr  6 22:37:50 2020 +0200

netapi32: Use standard dlopen() instead of the libwine wrappers.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/netapi32/netapi32.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/dlls/netapi32/netapi32.c b/dlls/netapi32/netapi32.c
index f86e033c21..4cbd02f9d3 100644
--- a/dlls/netapi32/netapi32.c
+++ b/dlls/netapi32/netapi32.c
@@ -57,7 +57,6 @@
 #include "dsgetdc.h"
 #include "davclnt.h"
 #include "wine/debug.h"
-#include "wine/library.h"
 #include "wine/list.h"
 #include "wine/unicode.h"
 #include "initguid.h"
@@ -134,19 +133,17 @@ static BOOL init_context(void)
 
 static BOOL libnetapi_init(void)
 {
-    char buf[200];
-
     if (libnetapi_handle) return TRUE;
-    if (!(libnetapi_handle = wine_dlopen( SONAME_LIBNETAPI, RTLD_NOW, buf, sizeof(buf) )))
+    if (!(libnetapi_handle = dlopen( SONAME_LIBNETAPI, RTLD_NOW )))
     {
-        WARN( "Failed to load libnetapi: %s\n", buf );
+        WARN( "Failed to load libnetapi: %s\n", dlerror() );
         return FALSE;
     }
 
 #define LOAD_FUNCPTR(f) \
-    if (!(p##f = wine_dlsym( libnetapi_handle, #f, buf, sizeof(buf) ))) \
+    if (!(p##f = dlsym( libnetapi_handle, #f ))) \
     { \
-        ERR( "Failed to load %s: %s\n", #f, buf ); \
+        ERR( "Failed to load %s: %s\n", #f, dlerror() ); \
         goto error; \
     }
 
@@ -167,7 +164,7 @@ static BOOL libnetapi_init(void)
     if (init_context()) return TRUE;
 
 error:
-    wine_dlclose( libnetapi_handle, NULL, 0 );
+    dlclose( libnetapi_handle );
     libnetapi_handle = NULL;
     return FALSE;
 }




More information about the wine-cvs mailing list