=?UTF-8?Q?Justas=20Lavi=C5=A1ius=20?=: include: Force stack alignment on x86_64.
Alexandre Julliard
julliard at winehq.org
Mon Aug 22 07:32:39 CDT 2016
Module: wine
Branch: stable
Commit: 13940871b7c820ad19a405194f1d91d4cdae2cca
URL: http://source.winehq.org/git/wine.git/?a=commit;h=13940871b7c820ad19a405194f1d91d4cdae2cca
Author: Justas Lavišius <bucaneer at gmail.com>
Date: Wed Jan 27 17:35:29 2016 +0200
include: Force stack alignment on x86_64.
Signed-off-by: Justas Lavišius <bucaneer at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit dccb57dfd9c668eff5e672def93405be8a3303bd)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
---
include/windef.h | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/include/windef.h b/include/windef.h
index e914726..1e54fcb 100644
--- a/include/windef.h
+++ b/include/windef.h
@@ -64,7 +64,11 @@ extern "C" {
# error You need to define __stdcall for your compiler
# endif
# elif defined(__x86_64__) && defined (__GNUC__)
-# define __stdcall __attribute__((ms_abi))
+# if (__GNUC__ > 5) || ((__GNUC__ == 5) && (__GNUC_MINOR__ >= 3))
+# define __stdcall __attribute__((ms_abi)) __attribute__((__force_align_arg_pointer__))
+# else
+# define __stdcall __attribute__((ms_abi))
+# endif
# else /* __i386__ */
# define __stdcall
# endif /* __i386__ */
@@ -78,7 +82,11 @@ extern "C" {
# define __cdecl __attribute__((__cdecl__))
# endif
# elif defined(__x86_64__) && defined (__GNUC__)
-# define __cdecl __attribute__((ms_abi))
+# if (__GNUC__ > 5) || ((__GNUC__ == 5) && (__GNUC_MINOR__ >= 3))
+# define __cdecl __attribute__((ms_abi)) __attribute__((__force_align_arg_pointer__))
+# else
+# define __cdecl __attribute__((ms_abi))
+# endif
# elif !defined(_MSC_VER)
# define __cdecl
# endif
More information about the wine-cvs
mailing list