Checks if the running OS is a MacOS/MacOS X.
@return true if MacOS (or MacOS X), false otherwise
777941
public static boolean isMacOs() {
        String osName = System.getProperty("os.name");
        return osName == null ? false : osName.toLowerCase().startsWith("mac");
    }
668253
def is_native_xmon_op(op: ops.Operation) -> bool:
    
    return (isinstance(op, ops.GateOperation) and
            is_native_xmon_gate(op.gate))
286604
def is_archlinux():
    """"""
    if platform.system().lower() == 'linux':
        if platform.linux_distribution() == ('', '', ''):
            # undefined distribution. Fixed in python 3.
            if os.path.exists('/etc/arch-release'):
                return True
    return False
1131512
protected function checkPlatform() 
    {
        if( stripos($this->_agent, 'iPad') !== false ) 
        {
		    $this->_platform = self::PLATFORM_APPLE; // iOS folgt spaeter
	    }
	    elseif( stripos($this->_agent, 'iPod') !== false ) 
	    {
		    $this->_platform = self::PLATFORM_APPLE; // iOS folgt spaeter
	    }
	    elseif( stripos($this->_agent, 'iPhone') !== false ) 
	    {
		    $this->_platform = self::PLATFORM_APPLE; // iOS folgt spaeter
	    }
	    elseif( stripos($this->_agent, 'android') !== false ) {
		    $this->_platform = self::PLATFORM_ANDROID;
	    }
	    elseif( stripos($this->_agent, 'mac') !== false ) {
	        $this->_platform = self::PLATFORM_APPLE;
	    }
	    elseif( stripos($this->_agent, 'linux') !== false ) {
		    $this->_platform = self::PLATFORM_LINUX;
	    }
	    elseif( stripos($this->_agent, 'windows phone') !== false ) {
	        $this->_platform = self::PLATFORM_WINDOWS_PHONE;
	    }
	    elseif( stripos($this->_agent, 'Nokia') !== false ) {
		    $this->_platform = self::PLATFORM_NOKIA;
	    }
	    elseif( stripos($this->_agent, 'BlackBerry') !== false ) {
		    $this->_platform = self::PLATFORM_BLACKBERRY;
	    }
	    elseif( stripos($this->_agent, 'windows ce') !== false ) {
	        $this->_platform = self::PLATFORM_WINDOWS_CE;
	    }
	    elseif( stripos($this->_agent, 'windows') !== false ) {
	        $this->_platform = self::PLATFORM_WINDOWS;
	    }
	    elseif( stripos($this->_agent,'FreeBSD') !== false ) {
		    $this->_platform = self::PLATFORM_FREEBSD;
	    }
	    elseif( stripos($this->_agent,'OpenBSD') !== false ) {
		    $this->_platform = self::PLATFORM_OPENBSD;
	    }
	    elseif( stripos($this->_agent,'NetBSD') !== false ) {
		    $this->_platform = self::PLATFORM_NETBSD;
	    }
	    elseif( stripos($this->_agent, 'OpenSolaris') !== false ) {
		    $this->_platform = self::PLATFORM_OPENSOLARIS;
	    }
	    elseif( stripos($this->_agent, 'SunOS') !== false ) {
		    $this->_platform = self::PLATFORM_SUNOS;
	    }
	    elseif( stripos($this->_agent, 'OS/2') !== false ) {
		    $this->_platform = self::PLATFORM_OS2;
	    }
	    elseif( stripos($this->_agent, 'BeOS') !== false ) {
		    $this->_platform = self::PLATFORM_BEOS;
	    }
	    elseif( stripos($this->_agent, 'win') !== false ) {
		    $this->_platform = self::PLATFORM_WINDOWS;
	    }
	    // add BugBuster
	    elseif( stripos($this->_agent, 'PHP') !== false ) {
		    $this->_platform = self::PLATFORM_PHP;
	    }
	    // add BugBuster
	    elseif( stripos($this->_agent, 'PLAYSTATION') !== false ) {
	        $this->_platform = self::PLATFORM_PLAYSTATION;
	    }

    }
937297
@Override
  public boolean isSSPISupported() {
    try {
      /*
       * SSPI is windows-only. Attempt to use JNA to identify the platform. If Waffle is missing we
       * won't have JNA and this will throw a NoClassDefFoundError.
       */
      if (!Platform.isWindows()) {
        LOGGER.log(Level.FINE, "SSPI not supported: non-Windows host");
        return false;
      }
      /* Waffle must be on the CLASSPATH */
      Class.forName("waffle.windows.auth.impl.WindowsSecurityContextImpl");
      return true;
    } catch (NoClassDefFoundError ex) {
      LOGGER.log(Level.WARNING, "SSPI unavailable (no Waffle/JNA libraries?)", ex);
      return false;
    } catch (ClassNotFoundException ex) {
      LOGGER.log(Level.WARNING, "SSPI unavailable (no Waffle/JNA libraries?)", ex);
      return false;
    }
  }
110919
public static boolean isWindows(){
        String os = System.getProperty("os.name");
        return os!=null && os.toLowerCase().startsWith("windows");
    }
598096
@Override
    public boolean isSystem()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        {
            SibTr.entry(tc, "isSystem");
            SibTr.exit(tc, "isSystem", Boolean.valueOf(_isSystem));
        }

        return _isSystem;
    }
1254287
public static boolean isLinux(String os) {
        if (os == null) {
            return false;
        }
        String operating = os.toLowerCase();
        return operating.contains("nix") || operating.contains("nux") || operating.contains("aix");
    }
255447
public static OS getOS() {
        String osname = SystemUtil.OS_NAME;
        String osarch = SystemUtil.OS_ARCH;

        if (osname.indexOf("Mac") != -1) {
            if (osarch.equals("x86")) return OS.MAC;
            else if (osarch.equals("x86_64")) return OS.MAC_64;
        } else if (osname.indexOf("Windows") != -1) {
            if (osarch.equals("x86")) return OS.WIN;
            else if (osarch.equals("x86_64")||osarch.equals("amd64")) return OS.WIN_64;
        } else if (osname.indexOf("Linux") != -1) {
            if (osarch.equals("i386")) return OS.LINUX;
            else if (osarch.equals("amd64")) return OS.LINUX_64;
        }

        return OS.OTHER;
    }
1267599
def is_ubuntu():
    """"""
    if sys.platform.startswith('linux') and osp.isfile('/etc/lsb-release'):
        release_info = open('/etc/lsb-release').read()
        if 'Ubuntu' in release_info:
            return True
        else:
            return False
    else:
        return False
129315
def get_build_platform():
    
    from sysconfig import get_platform

    plat = get_platform()
    if sys.platform == "darwin" and not plat.startswith('macosx-'):
        try:
            version = _macosx_vers()
            machine = os.uname()[4].replace(" ", "_")
            return "macosx-%d.%d-%s" % (
                int(version[0]), int(version[1]),
                _macosx_arch(machine),
            )
        except ValueError:
            # if someone is running a non-Mac darwin system, this will fall
            # through to the default implementation
            pass
    return plat
625351
public static boolean isMac() {
        if (System.getProperty(SEA_GLASS_OVERRIDE_OS_NAME) != null) {
            return System.getProperty(SEA_GLASS_OVERRIDE_OS_NAME).startsWith("Mac OS");
        }

        return System.getProperty("os.name").startsWith("Mac OS");
    }
832759
public static boolean isCompatible(Class<?>[] cs, Object[] os) {
		int len = cs.length;
		if (len != os.length)
			return false;
		if (len == 0)
			return true;
		for (int i = 0; i < len; i++)
			if (!isCompatible(cs[i], os[i]))
				return false;
		return true;
	}
73188
def should_run(self):
        
        should_run = True
        config = self.target or self.source
        if config.has('systems'):
            should_run = False
            valid_systems = [s.lower() for s in config.get('systems').split(",")]
            for system_type, param in [('is_osx', 'osx'),
                                       ('is_debian', 'debian')]:
                if param in valid_systems and getattr(system, system_type)():
                    should_run = True
        return should_run
1094074
public static boolean isAvailable() {
    try {
      String osName = System.getProperty("os.name");
      if (!osName.startsWith("Linux")) {
        LOG.info("ProcfsBasedProcessTree currently is supported only on "
            + "Linux.");
        return false;
      }
    } catch (SecurityException se) {
      LOG.warn("Failed to get Operating System name. " + se);
      return false;
    }
    return true;
  }
129107
protected function checkPlatform()
    {
        if (stripos($this->_agent, 'windows') !== false) {
            $this->_platform = self::PLATFORM_WINDOWS;
        } elseif (stripos($this->_agent, 'iPad') !== false) {
            $this->_platform = self::PLATFORM_IPAD;
        } elseif (stripos($this->_agent, 'iPod') !== false) {
            $this->_platform = self::PLATFORM_IPOD;
        } elseif (stripos($this->_agent, 'iPhone') !== false) {
            $this->_platform = self::PLATFORM_IPHONE;
        } elseif (stripos($this->_agent, 'mac') !== false) {
            $this->_platform = self::PLATFORM_APPLE;
        } elseif (stripos($this->_agent, 'android') !== false) {
            $this->_platform = self::PLATFORM_ANDROID;
        } elseif (stripos($this->_agent, 'linux') !== false) {
            $this->_platform = self::PLATFORM_LINUX;
        } elseif (stripos($this->_agent, 'Nokia') !== false) {
            $this->_platform = self::PLATFORM_NOKIA;
        } elseif (stripos($this->_agent, 'BlackBerry') !== false) {
            $this->_platform = self::PLATFORM_BLACKBERRY;
        } elseif (stripos($this->_agent, 'FreeBSD') !== false) {
            $this->_platform = self::PLATFORM_FREEBSD;
        } elseif (stripos($this->_agent, 'OpenBSD') !== false) {
            $this->_platform = self::PLATFORM_OPENBSD;
        } elseif (stripos($this->_agent, 'NetBSD') !== false) {
            $this->_platform = self::PLATFORM_NETBSD;
        } elseif (stripos($this->_agent, 'OpenSolaris') !== false) {
            $this->_platform = self::PLATFORM_OPENSOLARIS;
        } elseif (stripos($this->_agent, 'SunOS') !== false) {
            $this->_platform = self::PLATFORM_SUNOS;
        } elseif (stripos($this->_agent, 'OS\/2') !== false) {
            $this->_platform = self::PLATFORM_OS2;
        } elseif (stripos($this->_agent, 'BeOS') !== false) {
            $this->_platform = self::PLATFORM_BEOS;
        } elseif (stripos($this->_agent, 'win') !== false) {
            $this->_platform = self::PLATFORM_WINDOWS;
        }
    }
1153788
private static function checkOS2(Os $os, UserAgent $userAgent)
    {
        if (stripos($userAgent->getUserAgentString(), 'OS\/2') !== false) {
            $os->setVersion($os::VERSION_UNKNOWN);
            $os->setName($os::OS2);

            return true;
        }

        return false;
    }