[PATCH 2/4] include: Fix standard call types for ARM
André Hentschel
nerv at dawncrow.de
Sat Apr 6 07:36:27 CDT 2019
This fixes compilation of dbgeng on arm
Signed-off-by: André Hentschel <nerv at 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
--
2.17.1
More information about the wine-devel
mailing list