Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- include/private/vkd3d_common.h | 44 +++++++++++++++++++++++++++++++++ libs/vkd3d/device.c | 45 ---------------------------------- 2 files changed, 44 insertions(+), 45 deletions(-)
diff --git a/include/private/vkd3d_common.h b/include/private/vkd3d_common.h index 52ec6cce4..a85bc6d69 100644 --- a/include/private/vkd3d_common.h +++ b/include/private/vkd3d_common.h @@ -250,4 +250,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 */ diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c index d23062d09..31dcb5d3a 100644 --- a/libs/vkd3d/device.c +++ b/libs/vkd3d/device.c @@ -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;