summaryrefslogtreecommitdiff
path: root/tests/src/Interop/common
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2017-04-13 05:17:19 (GMT)
committerJiyoung Yun <jy910.yun@samsung.com>2017-04-13 05:17:19 (GMT)
commita56e30c8d33048216567753d9d3fefc2152af8ac (patch)
tree7e5d979695fc4a431740982eb1cfecc2898b23a5 /tests/src/Interop/common
parent4b11dc566a5bbfa1378d6266525c281b028abcc8 (diff)
downloadcoreclr-a56e30c8d33048216567753d9d3fefc2152af8ac.zip
coreclr-a56e30c8d33048216567753d9d3fefc2152af8ac.tar.gz
coreclr-a56e30c8d33048216567753d9d3fefc2152af8ac.tar.bz2
Imported Upstream version 2.0.0.11353upstream/2.0.0.11353
Diffstat (limited to 'tests/src/Interop/common')
-rw-r--r--tests/src/Interop/common/xplatform.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/src/Interop/common/xplatform.h b/tests/src/Interop/common/xplatform.h
index c84ac9b..36c4e56 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__