Add NetBSD support to NBI and CPUID

This commit is contained in:
kytv
2011-09-18 16:25:13 +00:00
parent 7f6c4faeb5
commit 2461b9525c
3 changed files with 43 additions and 32 deletions

View File

@@ -54,6 +54,7 @@ public class CPUID {
private static final boolean isWindows = System.getProperty("os.name").toLowerCase().contains("windows");
private static final boolean isLinux = System.getProperty("os.name").toLowerCase().contains("linux");
private static final boolean isFreebsd = System.getProperty("os.name").toLowerCase().contains("freebsd");
private static final boolean isNetbsd = System.getProperty("os.name").toLowerCase().contains("netbsd");
private static final boolean isSunos = System.getProperty("os.name").toLowerCase().contains("sunos");
private static final boolean isMac = System.getProperty("os.name").startsWith("Mac");
@@ -440,6 +441,8 @@ public class CPUID {
}
if(isFreebsd)
return "jcpuid-x86-freebsd"; // The convention on freebsd...
if(isNetbsd)
return "jcpuid-x86-netbsd"; // The convention on netbsd...
if(isSunos)
return "jcpuid-x86-solaris"; // The convention on SunOS
//throw new RuntimeException("Dont know jcpuid library name for os type '"+System.getProperty("os.name")+"'");
@@ -453,6 +456,8 @@ public class CPUID {
return "jcpuid-x86_64-windows";
if(isFreebsd)
return "jcpuid-x86_64-freebsd";
if(isNetbsd)
return "jcpuid-x86_64-netbsd";
if(isMac){
if(isX86){
return "jcpuid-x86_64-osx";

View File

@@ -157,6 +157,7 @@ public class NativeBigInteger extends BigInteger {
private static final boolean _isMac = System.getProperty("os.name").startsWith("Mac");
private static final boolean _isLinux = System.getProperty("os.name").toLowerCase().contains("linux");
private static final boolean _isFreebsd = System.getProperty("os.name").toLowerCase().contains("freebsd");
private static final boolean _isNetbsd = System.getProperty("os.name").toLowerCase().contains("netbsd");
private static final boolean _isSunos = System.getProperty("os.name").toLowerCase().contains("sunos");
private static final boolean _isAndroid = System.getProperty("java.vendor").contains("Android");
@@ -756,6 +757,8 @@ public class NativeBigInteger extends BigInteger {
return "jbigi-windows-";
if(_isFreebsd)
return "jbigi-freebsd-";
if(_isNetbsd)
return "jbigi-netbsd-";
if(_isMac)
return "jbigi-osx-";
if(_isOS2)

View File

@@ -1,3 +1,6 @@
2011-09-18 kytv
* Add NetBSD to NBI and CPUID
2011-09-16 zzz
* Console: Home page flag spacing
* EepGet: Add some new command line options