Author: nextgens
Date: 2006-07-02 19:40:22 +0000 (Sun, 02 Jul 2006)
New Revision: 9431
Modified:
trunk/freenet/src/freenet/support/CPUInformation/CPUID.java
trunk/freenet/src/net/i2p/util/NativeBigInteger.java
Log:
consistency fixes in NativeBigInteger and CPUID (related to ppc support)
Modified: trunk/freenet/src/freenet/support/CPUInformation/CPUID.java
===================================================================
--- trunk/freenet/src/freenet/support/CPUInformation/CPUID.java 2006-07-02
19:24:51 UTC (rev 9430)
+++ trunk/freenet/src/freenet/support/CPUInformation/CPUID.java 2006-07-02
19:40:22 UTC (rev 9431)
@@ -533,12 +533,15 @@
boolean isWindows
=(System.getProperty("os.name").toLowerCase().indexOf("windows") != -1);
boolean isLinux
=(System.getProperty("os.name").toLowerCase().indexOf("linux") != -1);
boolean isFreebsd
=(System.getProperty("os.name").toLowerCase().indexOf("freebsd") != -1);
+ boolean isMacOS
=(System.getProperty("os.name").toLowerCase().indexOf("mac os x") != -1);
if(isWindows)
return "jcpuid-x86-windows"; // The convention on
Windows
if(isLinux)
return "jcpuid-x86-linux"; // The convention on linux...
if(isFreebsd)
return "jcpuid-x86-freebsd"; // The convention on
freebsd...
+ if(isMacOS)
+ return "jcpuid-x86-osx"; // The convention on Mac OS
X...
throw new RuntimeException("Dont know jcpuid library name for
os type '"+System.getProperty("os.name")+"'");
}
Modified: trunk/freenet/src/net/i2p/util/NativeBigInteger.java
===================================================================
--- trunk/freenet/src/net/i2p/util/NativeBigInteger.java 2006-07-02
19:24:51 UTC (rev 9430)
+++ trunk/freenet/src/net/i2p/util/NativeBigInteger.java 2006-07-02
19:40:22 UTC (rev 9431)
@@ -115,7 +115,7 @@
private final static String JBIGI_OPTIMIZATION_PENTIUM2 = "pentium2";
private final static String JBIGI_OPTIMIZATION_PENTIUM3 = "pentium3";
private final static String JBIGI_OPTIMIZATION_PENTIUM4 = "pentium4";
- private final static String JBIGI_OPTIMIZATION_PPC
= "osx";
+ private final static String JBIGI_OPTIMIZATION_PPC
= "ppc";
private final static String sCPUType; //The CPU Type to optimize for (one
of the above strings)
@@ -569,7 +569,7 @@
if(isFreebsd)
return "jbigi-freebsd"+sAppend; // The convention on
freebsd...
if(isMacOS)
- return "jbigi-osx-none"; // The convention on Mac OS
X...
+ return "jbigi-osx"+sAppend; // The convention on Mac OS
X...
throw new RuntimeException("Dont know jbigi library name for os
type '"+System.getProperty("os.name")+"'");
}
private static final String getLibrarySuffix()
@@ -579,7 +579,7 @@
if(isWindows)
return "dll";
else if(isMacOS)
- return "jnilib";
+ return "jnilib";
else
return "so";
}