summaryrefslogtreecommitdiff
path: root/test/files/jvm/natives.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/jvm/natives.scala')
-rw-r--r--test/files/jvm/natives.scala14
1 files changed, 12 insertions, 2 deletions
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