Nick Burns : include:
Use force_align_arg_pointer on MacOS to fix the stack on entry to Wine.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Jun 14 06:49:50 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: 0da92ec9ca5822667e75ddae490943be9a1c320e
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=0da92ec9ca5822667e75ddae490943be9a1c320e
Author: Nick Burns <adger44 at hotmail.com>
Date: Thu Jun 8 19:57:42 2006 -0700
include: Use force_align_arg_pointer on MacOS to fix the stack on entry to Wine.
---
include/windef.h | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/include/windef.h b/include/windef.h
index 63fdcf7..2908cfc 100644
--- a/include/windef.h
+++ b/include/windef.h
@@ -52,7 +52,11 @@ #endif
#ifndef __stdcall
# ifdef __i386__
# ifdef __GNUC__
-# define __stdcall __attribute__((__stdcall__))
+# ifdef __APPLE__ /* Mac OSX uses 16-byte aligned stack and not a 4-byte one */
+# define __stdcall __attribute__((__stdcall__)) __attribute__((__force_align_arg_pointer__))
+# else
+# define __stdcall __attribute__((__stdcall__))
+# endif
# elif defined(_MSC_VER)
/* Nothing needs to be done. __stdcall already exists */
# else
@@ -65,7 +69,11 @@ #endif /* __stdcall */
#ifndef __cdecl
# if defined(__i386__) && defined(__GNUC__)
-# define __cdecl __attribute__((__cdecl__))
+# ifdef __APPLE__ /* Mac OSX uses 16-byte aligned stack and not a 4-byte one */
+# define __cdecl __attribute__((__cdecl__)) __attribute__((__force_align_arg_pointer__))
+# else
+# define __cdecl __attribute__((__cdecl__))
+# endif
# elif !defined(_MSC_VER)
# define __cdecl
# endif
More information about the wine-cvs
mailing list