Bug 37414 - Environment.Is64BitOperatingSystem returns false on OS X
Summary: Environment.Is64BitOperatingSystem returns false on OS X
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib (show other bugs)
Version: master
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
: 5483 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-01-05 14:25 UTC by Marek Habersack
Modified: 2016-01-13 02:01 UTC (History)
3 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments

Description Marek Habersack 2016-01-05 14:25:14 UTC
The property currently checks the pointer size which, under 32-bit Mono, will be 4 and thus the property will return 'false' which is incorrect since the operating system is 64-bit.
Comment 1 Marek Habersack 2016-01-05 14:29:10 UTC
The code to query the bitness of the OS could just invoke sysctl, in its simplest and most primitive form:

$ sysctl hw.optional.x86_64
hw.optional.x86_64: 1
Comment 2 Alexander Köplinger [MSFT] 2016-01-12 16:10:30 UTC
I took a stab at it in https://github.com/mono/mono/pull/2422
Comment 3 Alexander Köplinger [MSFT] 2016-01-12 16:11:13 UTC
*** Bug 5483 has been marked as a duplicate of this bug. ***
Comment 4 Alexander Köplinger [MSFT] 2016-01-13 02:01:34 UTC
PR was merged.

Note You need to log in before you can comment on or make changes to this bug.