From a56e30c8d33048216567753d9d3fefc2152af8ac Mon Sep 17 00:00:00 2001 From: Jiyoung Yun Date: Thu, 13 Apr 2017 14:17:19 +0900 Subject: Imported Upstream version 2.0.0.11353 --- tests/src/Interop/common/xplatform.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'tests/src/Interop/common') diff --git a/tests/src/Interop/common/xplatform.h b/tests/src/Interop/common/xplatform.h index c84ac9b1de..36c4e56f02 100644 --- a/tests/src/Interop/common/xplatform.h +++ b/tests/src/Interop/common/xplatform.h @@ -53,9 +53,14 @@ #endif //_WIN32 -#ifndef WINAPI -#define WINAPI __stdcall -#endif +// The default P/Invoke calling convetion is STDCALL on Window, but CDECL on Unix. +#ifdef _WIN32 +#define CALLBACK __stdcall +#define NATIVEAPI __stdcall +#else // _WIN32 +#define CALLBACK +#define NATIVEAPI +#endif // !_WIN32 #ifndef _MSC_VER #if __i386__ -- cgit v1.2.3