Add Hardware.is_64_bit? method

Closes Homebrew/homebrew#53
This commit is contained in:
Ben Alpert 2009-09-18 12:50:01 -06:00
parent bab6515668
commit e339a2a73f

View File

@ -60,6 +60,10 @@ class Hardware
@@processor_count ||= `/usr/sbin/sysctl -n hw.ncpu`.to_i
end
def self.is_64_bit?
self.sysctl_bool("hw.cpu64bit_capable")
end
protected
def self.sysctl_bool(property)
result = nil