Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/Native/jitinterface/dllexport.h')
-rw-r--r--src/Native/jitinterface/dllexport.h37
1 files changed, 27 insertions, 10 deletions
diff --git a/src/Native/jitinterface/dllexport.h b/src/Native/jitinterface/dllexport.h
index 4b28b7ba1..eac5f387f 100644
--- a/src/Native/jitinterface/dllexport.h
+++ b/src/Native/jitinterface/dllexport.h
@@ -2,22 +2,39 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
+
+// ***
+// Define default C export attributes
+// ***
#ifdef _WIN32
-#define DLL_EXPORT extern "C" __declspec(dllexport)
+#define DLL_EXPORT extern "C" __declspec(dllexport)
#else
-#define DLL_EXPORT extern "C" __attribute((visibility("default")))
-#endif
-
-#ifdef __i386__
+#define DLL_EXPORT extern "C" __attribute((visibility("default")))
+#endif // _WIN32
-#if !defined(__stdcall)
-#define __stdcall __attribute__((stdcall))
-#endif
-#else
+// ***
+// Define default call conventions
+// ***
+#ifndef _X86_
-#if !defined(__stdcall)
+#define DEFAULT_CALL_CONV
+#define __cdecl
#define __stdcall
+
+#else // _X86_
+
+#ifndef __stdcall
+#define __stdcall __attribute__((stdcall))
#endif
+#ifdef PLATFORM_UNIX
+#define DEFAULT_CALL_CONV
+#else
+#define DEFAULT_CALL_CONV __stdcall
#endif
+
+#endif // _X86_
+
+
+#define STDMETHODCALLTYPE DEFAULT_CALL_CONV