Chip Davis : include: Pick up the ms_hook_prologue attribute for Clang, too.

Alexandre Julliard julliard at winehq.org
Thu Sep 19 16:35:19 CDT 2019


Module: wine
Branch: master
Commit: 6e10f8fad3e23f97a2be3b46f8038094284cd068
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=6e10f8fad3e23f97a2be3b46f8038094284cd068

Author: Chip Davis <cdavis at codeweavers.com>
Date:   Wed Sep 11 10:34:23 2019 -0500

include: Pick up the ms_hook_prologue attribute for Clang, too.

Signed-off-by: Chip Davis <cdavis at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 include/winnt.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/include/winnt.h b/include/winnt.h
index 67d33f0d78..9c4174f310 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -163,7 +163,11 @@ extern "C" {
 # define DECLSPEC_HIDDEN
 #endif
 
-#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6))) && (defined(__i386__) || defined(__x86_64__))
+#ifndef __has_attribute
+# define __has_attribute(x) 0
+#endif
+
+#if ((defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)))) || __has_attribute(ms_hook_prologue)) && (defined(__i386__) || defined(__x86_64__))
 #define DECLSPEC_HOTPATCH __attribute__((__ms_hook_prologue__))
 #else
 #define DECLSPEC_HOTPATCH




More information about the wine-cvs mailing list