* Matthew Toseland <toad at amphibian.dyndns.org> [2008-03-06 23:07:04]:

> I thought the benchmarks showed that loading the library was unhelpful?
> 

I went to bed before fixing it, that's all :)

See r18408

> On Thursday 06 March 2008 15:31, nextgens at freenetproject.org wrote:
> > Author: nextgens
> > Date: 2008-03-06 15:31:37 +0000 (Thu, 06 Mar 2008)
> > New Revision: 18389
> > 
> > Modified:
> >    trunk/freenet/src/freenet/support/LibraryLoader.java
> >    trunk/freenet/src/freenet/support/io/NativeThread.java
> > Log:
> > Tweak NativeThread to toad the library on MacOs as well
> > 
> > Modified: trunk/freenet/src/freenet/support/LibraryLoader.java
> > ===================================================================
> > --- trunk/freenet/src/freenet/support/LibraryLoader.java    2008-03-06 
> > 14:51:09 
> UTC (rev 18388)
> > +++ trunk/freenet/src/freenet/support/LibraryLoader.java    2008-03-06 
> > 15:31:37 
> UTC (rev 18389)
> > @@ -35,7 +35,7 @@
> >             final boolean isWindows = File.pathSeparatorChar == '\\';
> >             final String libraryNameWithPrefix = (isWindows ? "" : "lib") + 
> libraryName;
> >             final String libraryNameWithPrefixAndArch = 
> > libraryNameWithPrefix + '-' + 
> getSimplifiedArchitecture();
> > -           final String libraryNameWithPrefixAndArchAndSuffix = 
> libraryNameWithPrefixAndArch + (isWindows ? ".dll" : ".so");
> > +           final String libraryNameWithPrefixAndArchAndSuffix = 
> libraryNameWithPrefixAndArch + (isWindows ? ".dll" : 
> ((System.getProperty("os.name")).toLowerCase().startsWith("mac") ? ".jnilib" 
> : ".so"));
> >             String resourceName = path + 
> > libraryNameWithPrefixAndArchAndSuffix;
> >  
> >             File nativeLib = new 
> > File((System.getProperty("java.library.path")) 
> + "/lib" + libraryName + (isWindows ? ".dll" : ".so"));
> > 
> > Modified: trunk/freenet/src/freenet/support/io/NativeThread.java
> > ===================================================================
> > --- trunk/freenet/src/freenet/support/io/NativeThread.java  2008-03-06 
> 14:51:09 UTC (rev 18388)
> > +++ trunk/freenet/src/freenet/support/io/NativeThread.java  2008-03-06 
> 15:31:37 UTC (rev 18389)
> > @@ -4,6 +4,7 @@
> >  
> >  package freenet.support.io;
> >  
> > +import java.io.File;
> >  import freenet.node.NodeStarter;
> >  import freenet.support.LibraryLoader;
> >  import freenet.support.Logger;
> > @@ -37,7 +38,7 @@
> >     
> >     static {
> >             Logger.minor(NativeThread.class, "Running init()");
> > -           _loadNative = 
> > "Linux".equalsIgnoreCase(System.getProperty("os.name")) && 
> NodeStarter.extBuildNumber > 18;
> > +           _loadNative = !(File.pathSeparatorChar == '\\') && 
> NodeStarter.extBuildNumber > 18;
> >             if(_loadNative) {
> >                     //System.loadLibrary("NativeThread");
> >                     LibraryLoader.loadNative("/freenet/support/io/", 
> > "NativeThread");
> > 
> > _______________________________________________
> > cvs mailing list
> > cvs at freenetproject.org
> > http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs
> > 
> > 



> _______________________________________________
> cvs mailing list
> cvs at freenetproject.org
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20080307/89b04990/attachment.pgp>

Reply via email to