Commit 4d0034e8 authored by Alexandre Julliard's avatar Alexandre Julliard

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

parent cf19a7ac
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
#include "mmreg.h" #include "mmreg.h"
#include "msacm.h" #include "msacm.h"
#include "msacmdrv.h" #include "msacmdrv.h"
#include "wine/library.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(gsm); WINE_DEFAULT_DEBUG_CHANNEL(gsm);
...@@ -58,8 +57,8 @@ FUNCPTR(gsm_encode); ...@@ -58,8 +57,8 @@ FUNCPTR(gsm_encode);
FUNCPTR(gsm_decode); FUNCPTR(gsm_decode);
#define LOAD_FUNCPTR(f) \ #define LOAD_FUNCPTR(f) \
if((p##f = wine_dlsym(libgsm_handle, #f, NULL, 0)) == NULL) { \ if((p##f = dlsym(libgsm_handle, #f)) == NULL) { \
wine_dlclose(libgsm_handle, NULL, 0); \ dlclose(libgsm_handle); \
libgsm_handle = NULL; \ libgsm_handle = NULL; \
return FALSE; \ return FALSE; \
} }
...@@ -69,9 +68,7 @@ FUNCPTR(gsm_decode); ...@@ -69,9 +68,7 @@ FUNCPTR(gsm_decode);
*/ */
static BOOL GSM_drvLoad(void) static BOOL GSM_drvLoad(void)
{ {
char error[128]; libgsm_handle = dlopen(SONAME_LIBGSM, RTLD_NOW);
libgsm_handle = wine_dlopen(SONAME_LIBGSM, RTLD_NOW, error, sizeof(error));
if (libgsm_handle) if (libgsm_handle)
{ {
LOAD_FUNCPTR(gsm_create); LOAD_FUNCPTR(gsm_create);
...@@ -83,7 +80,7 @@ static BOOL GSM_drvLoad(void) ...@@ -83,7 +80,7 @@ static BOOL GSM_drvLoad(void)
} }
else else
{ {
ERR("Couldn't load " SONAME_LIBGSM ": %s\n", error); ERR("Couldn't load " SONAME_LIBGSM ": %s\n", dlerror());
return FALSE; return FALSE;
} }
} }
...@@ -94,7 +91,7 @@ static BOOL GSM_drvLoad(void) ...@@ -94,7 +91,7 @@ static BOOL GSM_drvLoad(void)
static LRESULT GSM_drvFree(void) static LRESULT GSM_drvFree(void)
{ {
if (libgsm_handle) if (libgsm_handle)
wine_dlclose(libgsm_handle, NULL, 0); dlclose(libgsm_handle);
return 1; return 1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment