From e43af70de156de98ca4b9570e0639dae0b8170c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Tue, 27 Sep 2016 12:13:37 +0200 Subject: [PATCH] libs/vkd3d: Disable nameless unions. --- include/vkd3d_windows.h | 20 +++++++++++--------- libs/vkd3d/vkd3d_private.h | 1 + 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/include/vkd3d_windows.h b/include/vkd3d_windows.h index c2786cf1..a030d1be 100644 --- a/include/vkd3d_windows.h +++ b/include/vkd3d_windows.h @@ -23,7 +23,6 @@ #ifndef __VKD3D_WINDOWS_H #define __VKD3D_WINDOWS_H - #if !defined(_WIN32) || defined(__WIDL__) /* HRESULT */ @@ -143,9 +142,6 @@ typedef struct SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES; # define DECLSPEC_HIDDEN __attribute__((visibility("hidden"))) # endif -# define __C89_NAMELESS -# define __C89_NAMELESSUNIONNAME - /* Macros for COM interfaces */ # define interface struct # define BEGIN_INTERFACE @@ -180,11 +176,17 @@ typedef struct SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES; # include -# ifndef __C89_NAMELESS -# define __C89_NAMELESS -# define __C89_NAMELESSUNIONNAME -# endif /* __C89_NAMELESS */ - #endif /* _WIN32 */ + +#ifndef __C89_NAMELESS +# ifdef NONAMELESSUNION +# define __C89_NAMELESS +# define __C89_NAMELESSUNIONNAME u +# else +# define __C89_NAMELESS +# define __C89_NAMELESSUNIONNAME +# endif /* NONAMELESSUNION */ +#endif /* __C89_NAMELESS */ + #endif /* __VKD3D_WINDOWS_H */ diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index cf22303e..f9116b70 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -24,6 +24,7 @@ #define __VKD3D_PRIVATE_H #define COBJMACROS +#define NONAMELESSUNION #include "vkd3d_common.h" #include "vkd3d_debug.h" #include "vkd3d_vulkan.h"