mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
include: Move vkd3d_dl*() helpers to vkd3d_common.h.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
16da0b3300
commit
a58e713314
@ -246,4 +246,48 @@ static inline void vkd3d_parse_version(const char *version, int *major, int *min
|
||||
|
||||
HRESULT hresult_from_vkd3d_result(int vkd3d_result);
|
||||
|
||||
#ifdef HAVE_DLFCN_H
|
||||
#include <dlfcn.h>
|
||||
|
||||
static inline void *vkd3d_dlopen(const char *name)
|
||||
{
|
||||
return dlopen(name, RTLD_NOW);
|
||||
}
|
||||
|
||||
static inline void *vkd3d_dlsym(void *handle, const char *symbol)
|
||||
{
|
||||
return dlsym(handle, symbol);
|
||||
}
|
||||
|
||||
static inline int vkd3d_dlclose(void *handle)
|
||||
{
|
||||
return dlclose(handle);
|
||||
}
|
||||
|
||||
static inline const char *vkd3d_dlerror(void)
|
||||
{
|
||||
return dlerror();
|
||||
}
|
||||
#else
|
||||
static inline void *vkd3d_dlopen(const char *name)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline void *vkd3d_dlsym(void *handle, const char *symbol)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline int vkd3d_dlclose(void *handle)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline const char *vkd3d_dlerror(void)
|
||||
{
|
||||
return "Not implemented for this platform.\n";
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __VKD3D_COMMON_H */
|
||||
|
@ -19,51 +19,6 @@
|
||||
#include "vkd3d_private.h"
|
||||
#include "vkd3d_version.h"
|
||||
|
||||
#ifdef HAVE_DLFCN_H
|
||||
#include <dlfcn.h>
|
||||
|
||||
static void *vkd3d_dlopen(const char *name)
|
||||
{
|
||||
return dlopen(name, RTLD_NOW);
|
||||
}
|
||||
|
||||
static void *vkd3d_dlsym(void *handle, const char *symbol)
|
||||
{
|
||||
return dlsym(handle, symbol);
|
||||
}
|
||||
|
||||
static int vkd3d_dlclose(void *handle)
|
||||
{
|
||||
return dlclose(handle);
|
||||
}
|
||||
|
||||
static const char *vkd3d_dlerror(void)
|
||||
{
|
||||
return dlerror();
|
||||
}
|
||||
#else
|
||||
static void *vkd3d_dlopen(const char *name)
|
||||
{
|
||||
FIXME("Not implemented for this platform.\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void *vkd3d_dlsym(void *handle, const char *symbol)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int vkd3d_dlclose(void *handle)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const char *vkd3d_dlerror(void)
|
||||
{
|
||||
return "Not implemented for this platform.\n";
|
||||
}
|
||||
#endif
|
||||
|
||||
struct vkd3d_struct
|
||||
{
|
||||
enum vkd3d_structure_type type;
|
||||
|
Loading…
Reference in New Issue
Block a user