Henri Verbeet : include: Reintroduce hidden visibility for GUID definitions.
Alexandre Julliard
julliard at winehq.org
Tue Mar 1 15:44:12 CST 2022
Module: vkd3d
Branch: master
Commit: 9a2d9d4f5cc567665fccbd22e7d82bb251c56323
URL: https://source.winehq.org/git/vkd3d.git/?a=commit;h=9a2d9d4f5cc567665fccbd22e7d82bb251c56323
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Tue Mar 1 13:21:30 2022 +0100
include: Reintroduce hidden visibility for GUID definitions.
This was dropped by d27fee64ab51c60078215f461a797edd32bc8871, presumably
because the default visibility was switched to "hidden". However, this is part
of a public header, and external users may not share our symbol visibility
defaults.
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
include/vkd3d_windows.h | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/include/vkd3d_windows.h b/include/vkd3d_windows.h
index c1aa9f2..8398d40 100644
--- a/include/vkd3d_windows.h
+++ b/include/vkd3d_windows.h
@@ -127,18 +127,18 @@ typedef GUID IID;
# ifdef INITGUID
# ifndef __cplusplus
# define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
- const GUID name; \
+ const GUID name DECLSPEC_HIDDEN; \
const GUID name = \
{ l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 }}
# else
# define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
- EXTERN_C const GUID name; \
+ EXTERN_C const GUID name DECLSPEC_HIDDEN; \
EXTERN_C const GUID name = \
{ l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 }}
# endif
# else
# define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
- EXTERN_C const GUID name;
+ EXTERN_C const GUID name DECLSPEC_HIDDEN;
# endif /* INITGUID */
/* __uuidof emulation */
@@ -239,6 +239,17 @@ typedef struct SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES;
#endif /* _WIN32 */
+/* Define DECLSPEC_HIDDEN */
+#ifndef DECLSPEC_HIDDEN
+# if defined(__MINGW32__)
+# define DECLSPEC_HIDDEN
+# elif defined(__GNUC__)
+# define DECLSPEC_HIDDEN __attribute__((visibility("hidden")))
+# else
+# define DECLSPEC_HIDDEN
+# endif
+#endif /* DECLSPEC_HIDDEN */
+
/* Define min() & max() macros */
#ifndef NOMINMAX
# ifndef min
More information about the wine-cvs
mailing list