From 28e2e287d286de718b6be335c4209f67d742278b Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 6 Apr 2020 22:38:38 +0200 Subject: [PATCH] odbc32: Use standard dlopen() instead of the libwine wrappers. Signed-off-by: Alexandre Julliard --- dlls/odbc32/proxyodbc.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c index 041d4dbf01b..b28fb8928bf 100644 --- a/dlls/odbc32/proxyodbc.c +++ b/dlls/odbc32/proxyodbc.c @@ -38,7 +38,6 @@ #include "winbase.h" #include "winreg.h" #include "wine/debug.h" -#include "wine/library.h" #include "wine/unicode.h" #include "sql.h" @@ -493,7 +492,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, LPVOID reserved) case DLL_PROCESS_DETACH: if (reserved) break; - if (dmHandle) wine_dlclose(dmHandle,NULL,0); + if (dmHandle) dlclose(dmHandle); } return TRUE; @@ -512,14 +511,13 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD reason, LPVOID reserved) static BOOL ODBC_LoadDriverManager(void) { const char *s = getenv("LIB_ODBC_DRIVER_MANAGER"); - char error[256]; #ifdef SONAME_LIBODBC if (!s || !s[0]) s = SONAME_LIBODBC; #endif if (!s || !s[0]) goto failed; - dmHandle = wine_dlopen(s, RTLD_LAZY | RTLD_GLOBAL, error, sizeof(error)); + dmHandle = dlopen( s, RTLD_LAZY | RTLD_GLOBAL ); if (dmHandle != NULL) { @@ -528,7 +526,7 @@ static BOOL ODBC_LoadDriverManager(void) return TRUE; } failed: - ERR_(winediag)("failed to open library %s: %s\n", debugstr_a(s), error); + ERR_(winediag)("failed to open library %s: %s\n", debugstr_a(s), dlerror()); nErrorType = ERROR_LIBRARY_NOT_FOUND; return FALSE; } @@ -546,14 +544,12 @@ failed: static BOOL ODBC_LoadDMFunctions(void) { - char error[256]; - if (dmHandle == NULL) return FALSE; #define LOAD_FUNC(name) \ - if ((p##name = wine_dlsym( dmHandle, #name, error, sizeof(error) ))); \ - else WARN( "Failed to load %s: %s\n", #name, error ) + if ((p##name = dlsym( dmHandle, #name ))); \ + else WARN( "Failed to load %s: %s\n", #name, dlerror() ) LOAD_FUNC(SQLAllocConnect); LOAD_FUNC(SQLAllocEnv);