I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 7dffae46 authored by jrandom's avatar jrandom Committed by zzz
Browse files

workaround a bug in libtool (which Kaffe uses) that b0rks on native libraries...

workaround a bug in libtool (which Kaffe uses) that b0rks on native libraries that aren't named "typically" for the OS (libjbigi.so, etc)
(sun, however, works fine with randomly named libraries)
parent ce2e7305
No related branches found
No related tags found
No related merge requests found
......@@ -37,6 +37,8 @@ public class CPUID {
//.matches() is a java 1.4+ addition, using a simplified version for 1.3+
//private static final boolean isX86 = System.getProperty("os.arch").toLowerCase().matches("i?[x0-9]86(_64)?");
private static final boolean isX86 = (-1 != System.getProperty("os.arch").indexOf("86"));
private static final String libPrefix = (System.getProperty("os.name").startsWith("Win") ? "" : "lib");
private static final String libSuffix = (System.getProperty("os.name").startsWith("Win") ? ".dll" : ".so");
static
{
......@@ -483,7 +485,7 @@ public class CPUID {
File outFile = null;
try {
InputStream libStream = resource.openStream();
outFile = File.createTempFile("jcpuid", "lib.tmp");
outFile = File.createTempFile(libPrefix + "jcpuid", "lib.tmp" + libSuffix);
FileOutputStream fos = new FileOutputStream(outFile);
byte buf[] = new byte[4096*1024];
while (true) {
......
......@@ -103,6 +103,10 @@ public class NativeBigInteger extends BigInteger {
private final static String JBIGI_OPTIMIZATION_PENTIUM3 = "pentium3";
private final static String JBIGI_OPTIMIZATION_PENTIUM4 = "pentium4";
/* libjbigi.so vs jbigi.dll */
private static final String _libPrefix = (System.getProperty("os.name").startsWith("Win") ? "" : "lib");
private static final String _libSuffix = (System.getProperty("os.name").startsWith("Win") ? ".dll" : ".so");
private final static String sCPUType; //The CPU Type to optimize for (one of the above strings)
static {
......@@ -480,7 +484,7 @@ public class NativeBigInteger extends BigInteger {
File outFile = null;
try {
InputStream libStream = resource.openStream();
outFile = File.createTempFile("jbigi", "lib.tmp");
outFile = File.createTempFile(_libPrefix + "jbigi", "lib.tmp" + _libSuffix);
FileOutputStream fos = new FileOutputStream(outFile);
byte buf[] = new byte[4096*1024];
while (true) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment