From 5d7cab9703339c634228aacd7937a95e3bebd3a4 Mon Sep 17 00:00:00 2001 From: Ben Alpert Date: Fri, 18 Sep 2009 12:50:01 -0600 Subject: Add Hardware.is_64_bit? method Closes #53 --- Library/Homebrew/hardware.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Library/Homebrew/hardware.rb') diff --git a/Library/Homebrew/hardware.rb b/Library/Homebrew/hardware.rb index 3059f0875..18d4e6665 100644 --- a/Library/Homebrew/hardware.rb +++ b/Library/Homebrew/hardware.rb @@ -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 -- cgit v1.2.3