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

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2020-04-06 22:39:54 +02:00
parent b88730d8af
commit 7cb1ac7ba2
5 changed files with 8 additions and 13 deletions

View File

@ -86,7 +86,6 @@
#include "wincodecs_private.h"
#include "wine/debug.h"
#include "wine/library.h"
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);

View File

@ -52,7 +52,6 @@
#include "wine/heap.h"
#include "wine/debug.h"
#include "wine/library.h"
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
@ -86,10 +85,10 @@ MAKE_FUNCPTR(jpeg_write_scanlines);
static void *load_libjpeg(void)
{
if((libjpeg_handle = wine_dlopen(SONAME_LIBJPEG, RTLD_NOW, NULL, 0)) != NULL) {
if((libjpeg_handle = dlopen(SONAME_LIBJPEG, RTLD_NOW)) != NULL) {
#define LOAD_FUNCPTR(f) \
if((p##f = wine_dlsym(libjpeg_handle, #f, NULL, 0)) == NULL) { \
if((p##f = dlsym(libjpeg_handle, #f)) == NULL) { \
libjpeg_handle = NULL; \
return NULL; \
}

View File

@ -36,7 +36,6 @@
#include "wincodecs_private.h"
#include "wine/debug.h"
#include "wine/library.h"
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
@ -360,10 +359,10 @@ static void *load_libpng(void)
EnterCriticalSection(&init_png_cs);
if(!libpng_handle && (libpng_handle = wine_dlopen(SONAME_LIBPNG, RTLD_NOW, NULL, 0)) != NULL) {
if(!libpng_handle && (libpng_handle = dlopen(SONAME_LIBPNG, RTLD_NOW)) != NULL) {
#define LOAD_FUNCPTR(f) \
if((p##f = wine_dlsym(libpng_handle, #f, NULL, 0)) == NULL) { \
if((p##f = dlsym(libpng_handle, #f)) == NULL) { \
libpng_handle = NULL; \
LeaveCriticalSection(&init_png_cs); \
return NULL; \

View File

@ -30,7 +30,6 @@
#include "wincodecs_private.h"
#include "wine/debug.h"
#include "wine/library.h"
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);

View File

@ -37,7 +37,6 @@
#include "wincodecs_private.h"
#include "wine/debug.h"
#include "wine/library.h"
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
@ -90,13 +89,13 @@ static void *load_libtiff(void)
EnterCriticalSection(&init_tiff_cs);
if (!libtiff_handle &&
(libtiff_handle = wine_dlopen(SONAME_LIBTIFF, RTLD_NOW, NULL, 0)) != NULL)
(libtiff_handle = dlopen(SONAME_LIBTIFF, RTLD_NOW)) != NULL)
{
void * (*pTIFFSetWarningHandler)(void *);
void * (*pTIFFSetWarningHandlerExt)(void *);
#define LOAD_FUNCPTR(f) \
if((p##f = wine_dlsym(libtiff_handle, #f, NULL, 0)) == NULL) { \
if((p##f = dlsym(libtiff_handle, #f)) == NULL) { \
ERR("failed to load symbol %s\n", #f); \
libtiff_handle = NULL; \
LeaveCriticalSection(&init_tiff_cs); \
@ -117,9 +116,9 @@ static void *load_libtiff(void)
LOAD_FUNCPTR(TIFFWriteScanline);
#undef LOAD_FUNCPTR
if ((pTIFFSetWarningHandler = wine_dlsym(libtiff_handle, "TIFFSetWarningHandler", NULL, 0)))
if ((pTIFFSetWarningHandler = dlsym(libtiff_handle, "TIFFSetWarningHandler")))
pTIFFSetWarningHandler(NULL);
if ((pTIFFSetWarningHandlerExt = wine_dlsym(libtiff_handle, "TIFFSetWarningHandlerExt", NULL, 0)))
if ((pTIFFSetWarningHandlerExt = dlsym(libtiff_handle, "TIFFSetWarningHandlerExt")))
pTIFFSetWarningHandlerExt(NULL);
}