Author: toad
Date: 2005-10-12 21:48:47 +0000 (Wed, 12 Oct 2005)
New Revision: 7426

Modified:
   branches/legacy/unstable/src/freenet/Version.java
   branches/legacy/unstable/src/net/i2p/util/NativeBigInteger.java
   branches/legacy/unstable/start-freenet.sh
Log:
60275:
Detect Mac.
If found, look for jnilib's, and increase the fd limit with ulimit.

Modified: branches/legacy/unstable/src/freenet/Version.java
===================================================================
--- branches/legacy/unstable/src/freenet/Version.java   2005-10-12 19:50:08 UTC 
(rev 7425)
+++ branches/legacy/unstable/src/freenet/Version.java   2005-10-12 21:48:47 UTC 
(rev 7426)
@@ -21,7 +21,7 @@
        public static String altProtocolVersion = "1.52";

        /** The build number of the current revision */
-       public static final int buildNumber = 60274;
+       public static final int buildNumber = 60275;

        /** Oldest build of Fred we will talk to */
        public static final int lastGoodBuild = 60235;

Modified: branches/legacy/unstable/src/net/i2p/util/NativeBigInteger.java
===================================================================
--- branches/legacy/unstable/src/net/i2p/util/NativeBigInteger.java     
2005-10-12 19:50:08 UTC (rev 7425)
+++ branches/legacy/unstable/src/net/i2p/util/NativeBigInteger.java     
2005-10-12 21:48:47 UTC (rev 7426)
@@ -541,19 +541,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 isMac = System.getProperty("os.name").startsWith("Mac");
        if(isWindows)
                return "dll";
+       if(isMac)
+               return "jnilib";
        else
                return "so";
     }

Modified: branches/legacy/unstable/start-freenet.sh
===================================================================
--- branches/legacy/unstable/start-freenet.sh   2005-10-12 19:50:08 UTC (rev 
7425)
+++ branches/legacy/unstable/start-freenet.sh   2005-10-12 21:48:47 UTC (rev 
7426)
@@ -160,6 +160,12 @@
  fi
 fi 

+# Increase the file descriptor count for OSX. If freenet is launched from this 
script,
+# you may uncomment and set maxNodeConnections=512 in freenet.conf
+if test `uname` == "Darwin"; then
+       ulimit -S -n 1024
+fi
+
 echo -n "Starting Freenet now: "
 echo Command line: java -Xmx${MEMORY}m $JAVA_ARGS freenet.node.Main "$@"
 nice -n 10 -- java -Xmx${MEMORY}m $JAVA_ARGS freenet.node.Main "$@" &


Reply via email to