X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=bundles%2Forg.simantics.fastlz%2Fsrc%2Forg%2Fsimantics%2Ffastlz%2FARCHType.java;fp=bundles%2Forg.simantics.fastlz%2Fsrc%2Forg%2Fsimantics%2Ffastlz%2FARCHType.java;h=5f8fbecc78753b27b6f7f17f34d64b18e0531110;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hp=a4ddedef7c335e1ef8b860e52fc12335b0b52790;hpb=24e2b34260f219f0d1644ca7a138894980e25b14;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.fastlz/src/org/simantics/fastlz/ARCHType.java b/bundles/org.simantics.fastlz/src/org/simantics/fastlz/ARCHType.java index a4ddedef7..5f8fbecc7 100644 --- a/bundles/org.simantics.fastlz/src/org/simantics/fastlz/ARCHType.java +++ b/bundles/org.simantics.fastlz/src/org/simantics/fastlz/ARCHType.java @@ -1,36 +1,36 @@ -/******************************************************************************* - * Copyright (c) 2007, 2011 Association for Decentralized Information Management - * in Industry THTH ry. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.fastlz; - -/** - * @author Tuukka Lehtonen - */ -public enum ARCHType { - PPC, PPC_64, SPARC, X86, X86_64, UNKNOWN; - - public static ARCHType calculate() { - String osArch = System.getProperty("os.arch"); - assert osArch != null; - osArch = osArch.toLowerCase(); - if (osArch.equals("i386") || osArch.equals("i586") || osArch.equals("i686") || osArch.equals("x86")) - return X86; - if (osArch.startsWith("amd64") || osArch.startsWith("x86_64")) - return X86_64; - if (osArch.equals("ppc")) - return PPC; - if (osArch.startsWith("ppc")) - return PPC_64; - if (osArch.startsWith("sparc")) - return SPARC; - return UNKNOWN; - } +/******************************************************************************* + * Copyright (c) 2007, 2011 Association for Decentralized Information Management + * in Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.fastlz; + +/** + * @author Tuukka Lehtonen + */ +public enum ARCHType { + PPC, PPC_64, SPARC, X86, X86_64, UNKNOWN; + + public static ARCHType calculate() { + String osArch = System.getProperty("os.arch"); + assert osArch != null; + osArch = osArch.toLowerCase(); + if (osArch.equals("i386") || osArch.equals("i586") || osArch.equals("i686") || osArch.equals("x86")) + return X86; + if (osArch.startsWith("amd64") || osArch.startsWith("x86_64")) + return X86_64; + if (osArch.equals("ppc")) + return PPC; + if (osArch.startsWith("ppc")) + return PPC_64; + if (osArch.startsWith("sparc")) + return SPARC; + return UNKNOWN; + } } \ No newline at end of file