[corlib] Properly implement Environment.Is64BitOperatingSystem
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Tue, 12 Jan 2016 15:51:13 +0000 (16:51 +0100)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Wed, 13 Jan 2016 01:46:37 +0000 (02:46 +0100)
commit2fa5d255abb2f1685282893cb8e2c57234540278
tree568152fd2896ce3a37e42f8d06571a50235d2bf5
parente7961fa20d01556b2337c7bffbba6e0b92a2f507
[corlib] Properly implement Environment.Is64BitOperatingSystem

Before we only checked if IntPtr.Size == 8, but this returns false for a 32bit Mono running on a 64bit OS.
Added an icall that gets the correct value from the runtime instead.

Note: this currently only whitelists x86_64, aarch64 and ppc64 as 64-bit platforms.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=37414
mcs/class/corlib/System/Environment.cs
mono/metadata/icall-def.h
mono/metadata/icall.c