diff --git a/include/msvcrt/crtdefs.h b/include/msvcrt/crtdefs.h index 9ec20828f56..ff0f4bd7901 100644 --- a/include/msvcrt/crtdefs.h +++ b/include/msvcrt/crtdefs.h @@ -60,6 +60,8 @@ # else # define __stdcall __attribute__((ms_abi)) # endif +# elif defined(__arm__) && defined (__GNUC__) +# define __stdcall __attribute__((pcs("aapcs-vfp"))) # else /* __i386__ */ # define __stdcall # endif /* __i386__ */ @@ -78,6 +80,8 @@ # else # define __cdecl __attribute__((ms_abi)) # endif +# elif defined(__arm__) && defined (__GNUC__) +# define __cdecl __attribute__((pcs("aapcs-vfp"))) # elif !defined(_MSC_VER) # define __cdecl # endif @@ -102,7 +106,11 @@ #endif #ifndef WINAPIV -# define WINAPIV __cdecl +# if defined(__arm__) && defined (__GNUC__) +# define WINAPIV __attribute__((pcs("aapcs"))) +# else +# define WINAPIV __cdecl +# endif #endif #ifndef DECLSPEC_ALIGN diff --git a/include/windef.h b/include/windef.h index e77b1ca0e00..d2afcf47c33 100644 --- a/include/windef.h +++ b/include/windef.h @@ -69,6 +69,8 @@ extern "C" { # else # define __stdcall __attribute__((ms_abi)) # endif +# elif defined(__arm__) && defined (__GNUC__) +# define __stdcall __attribute__((pcs("aapcs-vfp"))) # else /* __i386__ */ # define __stdcall # endif /* __i386__ */ @@ -87,6 +89,8 @@ extern "C" { # else # define __cdecl __attribute__((ms_abi)) # endif +# elif defined(__arm__) && defined (__GNUC__) +# define __cdecl __attribute__((pcs("aapcs-vfp"))) # elif !defined(_MSC_VER) # define __cdecl # endif @@ -110,6 +114,12 @@ extern "C" { # endif #endif +#if defined(__arm__) && defined (__GNUC__) +# define WINAPIV __attribute__((pcs("aapcs"))) +#else +# define WINAPIV __cdecl +#endif + #ifdef __WINESRC__ #define __ONLY_IN_WINELIB(x) do_not_use_this_in_wine #else @@ -179,7 +189,6 @@ extern "C" { #define PASCAL __stdcall #define CDECL __cdecl #define _CDECL __cdecl -#define WINAPIV __cdecl #define APIENTRY WINAPI #define CONST __ONLY_IN_WINELIB(const)