Author: toad
Date: 2005-10-12 21:51:32 +0000 (Wed, 12 Oct 2005)
New Revision: 7427

Modified:
   branches/publish-subscribe/freenet/src/net/i2p/util/NativeBigInteger.java
Log:
NativeBigInteger: Use Mac native libs on Mac.

Modified: 
branches/publish-subscribe/freenet/src/net/i2p/util/NativeBigInteger.java
===================================================================
--- branches/publish-subscribe/freenet/src/net/i2p/util/NativeBigInteger.java   
2005-10-12 21:48:47 UTC (rev 7426)
+++ branches/publish-subscribe/freenet/src/net/i2p/util/NativeBigInteger.java   
2005-10-12 21:51:32 UTC (rev 7427)
@@ -543,19 +543,25 @@
        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 isMac = System.getProperty("os.name").startsWith("Mac");
        if(isWindows)
                        return "jbigi-windows"+sAppend; // The convention on 
Windows
                if(isLinux)
                        return "jbigi-linux"+sAppend; // The convention on 
linux...
                if(isFreebsd)
                        return "jbigi-freebsd"+sAppend; // The convention on 
freebsd...
+               if(isMac)
+                       return "jbigi-osx"+sAppend; // The convention on 
MacOS...
                throw new RuntimeException("Dont know jbigi library name for os 
type '"+System.getProperty("os.name")+"'");
     }
     private static final String getLibrarySuffix()
     {
-       boolean isWindows 
=System.getProperty("os.name").toLowerCase().indexOf("windows") != -1;
+       boolean isWindows = 
System.getProperty("os.name").toLowerCase().indexOf("windows") != -1;
+       boolean isMac = System.getProperty("os.name").startsWith("Mac");
        if(isWindows)
                return "dll";
+       if(isMac)
+               return "jnilib";
        else
                return "so";
     }

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to