This fixes compilation of dbgeng on arm
Signed-off-by: André Hentschel nerv@dawncrow.de --- include/basetyps.h | 8 ++++++++ include/winnt.h | 15 +++++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/include/basetyps.h b/include/basetyps.h index d55005fbd79..662d5b68791 100644 --- a/include/basetyps.h +++ b/include/basetyps.h @@ -26,10 +26,18 @@ # define EXTERN_C extern #endif
+#if defined(__arm__) && defined (__GNUC__) +#define STDMETHODCALLTYPE __attribute__((pcs("aapcs-vfp"))) +#define STDMETHODVCALLTYPE __attribute__((pcs("aapcs"))) +#define STDAPICALLTYPE __attribute__((pcs("aapcs-vfp"))) +#define STDAPIVCALLTYPE __attribute__((pcs("aapcs"))) +#else #define STDMETHODCALLTYPE __stdcall #define STDMETHODVCALLTYPE __cdecl #define STDAPICALLTYPE __stdcall #define STDAPIVCALLTYPE __cdecl +#endif + #define STDAPI EXTERN_C HRESULT STDAPICALLTYPE #define STDAPI_(t) EXTERN_C t STDAPICALLTYPE #define STDMETHODIMP HRESULT STDMETHODCALLTYPE diff --git a/include/winnt.h b/include/winnt.h index 29a7372c89e..d936b60981f 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -412,10 +412,17 @@ extern "C++" { \ # define EXTERN_C extern #endif
-#define STDMETHODCALLTYPE __stdcall -#define STDMETHODVCALLTYPE __cdecl -#define STDAPICALLTYPE __stdcall -#define STDAPIVCALLTYPE __cdecl +#if defined(__arm__) && defined (__GNUC__) +#define STDMETHODCALLTYPE __attribute__((pcs("aapcs-vfp"))) +#define STDMETHODVCALLTYPE __attribute__((pcs("aapcs"))) +#define STDAPICALLTYPE __attribute__((pcs("aapcs-vfp"))) +#define STDAPIVCALLTYPE __attribute__((pcs("aapcs"))) +#else +#define STDMETHODCALLTYPE __stdcall +#define STDMETHODVCALLTYPE __cdecl +#define STDAPICALLTYPE __stdcall +#define STDAPIVCALLTYPE __cdecl +#endif
#define STDAPI EXTERN_C HRESULT STDAPICALLTYPE #define STDAPI_(type) EXTERN_C type STDAPICALLTYPE
André Hentschel nerv@dawncrow.de writes:
@@ -26,10 +26,18 @@ # define EXTERN_C extern #endif
+#if defined(__arm__) && defined (__GNUC__) +#define STDMETHODCALLTYPE __attribute__((pcs("aapcs-vfp"))) +#define STDMETHODVCALLTYPE __attribute__((pcs("aapcs"))) +#define STDAPICALLTYPE __attribute__((pcs("aapcs-vfp"))) +#define STDAPIVCALLTYPE __attribute__((pcs("aapcs"))) +#else #define STDMETHODCALLTYPE __stdcall #define STDMETHODVCALLTYPE __cdecl #define STDAPICALLTYPE __stdcall #define STDAPIVCALLTYPE __cdecl +#endif
There shouldn't be any reason to add more ifdefs, just use the existing definitions. For varargs functions you want WINAPIV.