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

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZoltan Varga <vargaz@gmail.com>2017-02-22 20:49:10 +0300
committerGitHub <noreply@github.com>2017-02-22 20:49:10 +0300
commit53925041e12a82ae1a71aba31d1b5f0eb779f411 (patch)
treefb1e044aeec4ba9491cfdff25ec19ba264a4354e
parent9389d44cbaacbea3062eff6741b7378ca4890818 (diff)
[runtime] Use TARGET_WIN32 instead of HOST_WIN32 when setting calling conventions, so cross compilers running on windows do the right thing. (#4412)
-rw-r--r--mono/metadata/icall.c2
-rw-r--r--mono/metadata/loader.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/mono/metadata/icall.c b/mono/metadata/icall.c
index 4b56f405345..120d41fb28f 100644
--- a/mono/metadata/icall.c
+++ b/mono/metadata/icall.c
@@ -8542,7 +8542,7 @@ mono_create_icall_signature (const char *sigstr)
res = mono_metadata_signature_alloc (corlib, len - 1);
res->pinvoke = 1;
-#ifdef HOST_WIN32
+#ifdef TARGET_WIN32
/*
* Under windows, the default pinvoke calling convention is STDCALL but
* we need CDECL.
diff --git a/mono/metadata/loader.c b/mono/metadata/loader.c
index 0309ce8404e..8bd15165bcf 100644
--- a/mono/metadata/loader.c
+++ b/mono/metadata/loader.c
@@ -2436,7 +2436,7 @@ mono_method_signature_checked (MonoMethod *m, MonoError *error)
}
if (m->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL) {
signature->pinvoke = 1;
-#ifdef HOST_WIN32
+#ifdef TARGET_WIN32
/*
* On Windows the default pinvoke calling convention is STDCALL but
* we need CDECL since this is actually an icall.