From 4a1f1082e47ac0fddd6d4925636a557a593f3801 Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Mon, 2 May 2022 18:05:30 +0200 Subject: [PATCH] include: Use Mingw64's __uuidof when present. otherwise Wine's and Mingw64's __uuidof() conflict (C++) Signed-off-by: Eric Pouech Signed-off-by: Alexandre Julliard --- include/guiddef.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/guiddef.h b/include/guiddef.h index 912fcea0cbe..6f7e26df0c6 100644 --- a/include/guiddef.h +++ b/include/guiddef.h @@ -44,7 +44,10 @@ typedef struct _GUID /* Macros for __uuidof emulation */ #ifdef __cplusplus # if defined(__MINGW32__) -# define __WINE_UUID_ATTR __attribute__((selectany)) +# if !defined(__uuidof) /* Mingw64 can provide support for __uuidof and __CRT_UUID_DECL */ +# define __WINE_UUID_ATTR __attribute__((selectany)) +# undef __CRT_UUID_DECL +# endif # elif defined(__GNUC__) # define __WINE_UUID_ATTR __attribute__((visibility("hidden"),weak)) # endif @@ -76,7 +79,7 @@ extern "C++" { #define __uuidof(type) __wine_uuidof_type<__typeof__(type)>::inst::uuid -#else /* __WINE_UUID_ATTR */ +#elif !defined(__CRT_UUID_DECL) #define __CRT_UUID_DECL(type,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8)