From: Timothy Pearson tpearson@raptorengineering.com
Signed-off-by: André Hentschel nerv@dawncrow.de --- include/msvcrt/corecrt.h | 3 +++ include/windef.h | 3 +++ 2 files changed, 6 insertions(+)
diff --git a/include/msvcrt/corecrt.h b/include/msvcrt/corecrt.h index 4adbe0920f6..7559d68ab79 100644 --- a/include/msvcrt/corecrt.h +++ b/include/msvcrt/corecrt.h @@ -83,6 +83,9 @@ # define __stdcall __attribute__((pcs("aapcs-vfp"))) # elif defined(__aarch64__) && defined (__GNUC__) && __has_attribute(ms_abi) # 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__ */ diff --git a/include/windef.h b/include/windef.h index ac2ec619fbd..b69cbe51f6d 100644 --- a/include/windef.h +++ b/include/windef.h @@ -76,6 +76,9 @@ extern "C" { # define __stdcall __attribute__((pcs("aapcs-vfp"))) # elif defined(__aarch64__) && defined (__GNUC__) && __has_attribute(ms_abi) # 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__ */