From 481741edaa615e8d9176c9c65aebe0217ff1b23a Mon Sep 17 00:00:00 2001 From: Gilles Dubochet Date: Thu, 7 Feb 2008 13:25:36 +0000 Subject: Fixed "natives" test to work on my Mac. --- test/files/jvm/natives.scala | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'test/files/jvm/natives.scala') diff --git a/test/files/jvm/natives.scala b/test/files/jvm/natives.scala index 4cea731cd3..14ee4e1c1b 100644 --- a/test/files/jvm/natives.scala +++ b/test/files/jvm/natives.scala @@ -1,7 +1,17 @@ object Test { + //println("java.library.path=" + System.getProperty("java.library.path")) - val model = System.getProperty("sun.arch.data.model", "32") - System.loadLibrary("natives-" + model) + + val sysWordSize = System.getProperty("sun.arch.data.model", "32") + val sysType = System.getProperty("os.name") + + val libName = + if (sysType == "Mac OS X") + "natives" + else + "natives-" + sysWordSize + + System.loadLibrary(libName) @native def sayHello(s: String): String = null -- cgit v1.2.3