From: Timothy Pearson tpearson@raptorengineering.com
Signed-off-by: André Hentschel nerv@dawncrow.de --- include/msvcrt/corecrt.h | 6 ++++++ include/windef.h | 6 ++++++ 2 files changed, 12 insertions(+)
diff --git a/include/msvcrt/corecrt.h b/include/msvcrt/corecrt.h index ad46c56591c..a22e5045a34 100644 --- a/include/msvcrt/corecrt.h +++ b/include/msvcrt/corecrt.h @@ -78,6 +78,9 @@ # define __stdcall __attribute__((pcs("aapcs-vfp"))) # elif defined(__aarch64__) && defined (__GNUC__) # define __stdcall __attribute__((ms_abi)) +# elif defined(__powerpc64__) && defined (__GNUC__) && !defined (__clang__) + /* ppc64 relies on long calls being generated for thunks (r2 save / restore) */ +# define __stdcall __attribute__((__longcall__)) # else /* __i386__ */ # define __stdcall # endif /* __i386__ */ @@ -100,6 +103,9 @@ # define __cdecl __attribute__((pcs("aapcs-vfp"))) # elif defined(__aarch64__) && defined (__GNUC__) # define __cdecl __attribute__((ms_abi)) +# elif defined(__powerpc64__) && defined (__GNUC__) && !defined (__clang__) + /* ppc64 relies on long calls being generated for thunks (r2 save / restore) */ +# define __cdecl __attribute__((__longcall__)) # else # define __cdecl # endif diff --git a/include/windef.h b/include/windef.h index 521c3ab4512..a94921905ed 100644 --- a/include/windef.h +++ b/include/windef.h @@ -71,6 +71,9 @@ extern "C" { # define __stdcall __attribute__((pcs("aapcs-vfp"))) # elif defined(__aarch64__) && defined (__GNUC__) # define __stdcall __attribute__((ms_abi)) +# elif defined(__powerpc64__) && defined (__GNUC__) && !defined (__clang__) + /* ppc64 relies on long calls being generated for thunks (r2 save / restore) */ +# define __stdcall __attribute__((__longcall__)) # else /* __i386__ */ # define __stdcall # endif /* __i386__ */ @@ -93,6 +96,9 @@ extern "C" { # define __cdecl __attribute__((pcs("aapcs-vfp"))) # elif defined(__aarch64__) && defined (__GNUC__) # define __cdecl __attribute__((ms_abi)) +# elif defined(__powerpc64__) && defined (__GNUC__) && !defined (__clang__) + /* ppc64 relies on long calls being generated for thunks (r2 save / restore) */ +# define __cdecl __attribute__((__longcall__)) # else # define __cdecl # endif