Nick Burns : winegcc: __stdcall__ and __cdecl__ defined safely for
Mac OSX.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Oct 9 14:05:04 CDT 2006
Module: wine
Branch: master
Commit: 3ce4350e67ef2750a8c2fcbe54121bbde543c7c4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3ce4350e67ef2750a8c2fcbe54121bbde543c7c4
Author: Nick Burns <adger44 at hotmail.com>
Date: Sat Oct 7 14:57:25 2006 -0700
winegcc: __stdcall__ and __cdecl__ defined safely for Mac OSX.
---
tools/winegcc/winegcc.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
index ff38076..663a029 100644
--- a/tools/winegcc/winegcc.c
+++ b/tools/winegcc/winegcc.c
@@ -285,11 +285,19 @@ #endif
if (gcc_defs)
{
+#ifdef __APPLE__ /* Mac OSX uses 16-byte aligned stack and not a 4-byte one */
+ strarray_add(comp_args, "-D__stdcall=__attribute__((__stdcall__)) __attribute__((__force_align_arg_pointer__))");
+ strarray_add(comp_args, "-D__cdecl=__attribute__((__cdecl__)) __attribute__((__force_align_arg_pointer__))");
+ strarray_add(comp_args, "-D_stdcall=__attribute__((__stdcall__)) __attribute__((__force_align_arg_pointer__))");
+ strarray_add(comp_args, "-D_cdecl=__attribute__((__cdecl__)) __attribute__((__force_align_arg_pointer__))");
+#else
strarray_add(comp_args, "-D__stdcall=__attribute__((__stdcall__))");
strarray_add(comp_args, "-D__cdecl=__attribute__((__cdecl__))");
- strarray_add(comp_args, "-D__fastcall=__attribute__((__fastcall__))");
strarray_add(comp_args, "-D_stdcall=__attribute__((__stdcall__))");
strarray_add(comp_args, "-D_cdecl=__attribute__((__cdecl__))");
+#endif
+
+ strarray_add(comp_args, "-D__fastcall=__attribute__((__fastcall__))");
strarray_add(comp_args, "-D_fastcall=__attribute__((__fastcall__))");
strarray_add(comp_args, "-D__declspec(x)=__declspec_##x");
strarray_add(comp_args, "-D__declspec_align(x)=__attribute__((aligned(x)))");
More information about the wine-cvs
mailing list