diff options
author | tduehr <td@matasano.com> | 2015-06-04 15:06:06 -0500 |
---|---|---|
committer | tduehr <td@matasano.com> | 2015-06-04 15:06:06 -0500 |
commit | 5885e69f18fccda9e12396d194783945df2005b1 (patch) | |
tree | eb004b9df9a0d20522aa47899b753c2a92524710 | |
parent | 83c53aa8d51a24f6f7e2f866eeb1649484f57a22 (diff) | |
parent | d81e709cb27b6f947db48b0cdaa8759261647801 (diff) | |
download | ffi-5885e69f18fccda9e12396d194783945df2005b1.tar.gz |
Merge pull request #437 from djberg96/is_solaris_update
Add FFI::Platform.solaris? singleton method
-rw-r--r-- | lib/ffi/platform.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/ffi/platform.rb b/lib/ffi/platform.rb index ab647ef..7393459 100644 --- a/lib/ffi/platform.rb +++ b/lib/ffi/platform.rb @@ -79,7 +79,7 @@ module FFI def self.is_os(os) OS == os end - + NAME = "#{ARCH}-#{OS}" IS_GNU = defined?(GNU_LIBC) IS_LINUX = is_os("linux") @@ -87,12 +87,12 @@ module FFI IS_FREEBSD = is_os("freebsd") IS_NETBSD = is_os("netbsd") IS_OPENBSD = is_os("openbsd") + IS_SOLARIS = is_os("solaris") IS_WINDOWS = is_os("windows") IS_BSD = IS_MAC || IS_FREEBSD || IS_NETBSD || IS_OPENBSD CONF_DIR = File.join(File.dirname(__FILE__), 'platform', NAME) - public - + public LIBPREFIX = case OS when /windows/ @@ -143,6 +143,12 @@ module FFI IS_MAC end + # Test if current OS is Solaris (Sun OS) + # @return [Boolean] + def self.solaris? + IS_SOLARIS + end + # Test if current OS is a unix OS # @return [Boolean] def self.unix? |