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

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


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

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

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

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

---

 programs/wineconsole/curses.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/programs/wineconsole/curses.c b/programs/wineconsole/curses.c
index 6c35554d84..6fa669d150 100644
--- a/programs/wineconsole/curses.c
+++ b/programs/wineconsole/curses.c
@@ -53,7 +53,6 @@
 #include <winnls.h>
 #include "winecon_private.h"
 
-#include "wine/library.h"
 #include "wine/debug.h"
 #undef ERR
 #define ERR (-1)
@@ -139,7 +138,7 @@ static BOOL WCCURSES_bind_libcurses(void)
     static const char ncname[] = SONAME_LIBCURSES;
 #endif
 
-    nc_handle = wine_dlopen(ncname, RTLD_NOW, NULL, 0);
+    nc_handle = dlopen(ncname, RTLD_NOW);
     if(!nc_handle)
     {
         WINE_MESSAGE("Wine cannot find the " CURSES_NAME " library (%s).\n",
@@ -147,11 +146,11 @@ static BOOL WCCURSES_bind_libcurses(void)
         return FALSE;
     }
 
-#define LOAD_FUNCPTR(f)                                      \
-    if((p_##f = wine_dlsym(nc_handle, #f, NULL, 0)) == NULL) \
-    {                                                        \
-        WINE_WARN("Can't find symbol %s\n", #f);             \
-        goto sym_not_found;                                  \
+#define LOAD_FUNCPTR(f) \
+    if((p_##f = dlsym(nc_handle, #f)) == NULL) \
+    { \
+        WINE_WARN("Can't find symbol %s\n", #f); \
+        goto sym_not_found; \
     }
 
     LOAD_FUNCPTR(curs_set)
@@ -200,7 +199,7 @@ sym_not_found:
       "Wine cannot find certain functions that it needs inside the "
        CURSES_NAME "\nlibrary.  To enable Wine to use " CURSES_NAME 
       " please upgrade your " CURSES_NAME "\nlibraries\n");
-    wine_dlclose(nc_handle, NULL, 0);
+    dlclose(nc_handle);
     nc_handle = NULL;
     return FALSE;
 }




More information about the wine-cvs mailing list