summaryrefslogtreecommitdiff
path: root/test/files/jvm/natives.scala
diff options
context:
space:
mode:
authorGilles Dubochet <gilles.dubochet@epfl.ch>2008-02-07 13:25:36 +0000
committerGilles Dubochet <gilles.dubochet@epfl.ch>2008-02-07 13:25:36 +0000
commit481741edaa615e8d9176c9c65aebe0217ff1b23a (patch)
treed0a6a089e515b20648dfcd3e0feb23ad5b895649 /test/files/jvm/natives.scala
parentb3d232dbbe5a9a6debdaac526589b67389153ff9 (diff)
downloadscala-481741edaa615e8d9176c9c65aebe0217ff1b23a.tar.gz
scala-481741edaa615e8d9176c9c65aebe0217ff1b23a.tar.bz2
scala-481741edaa615e8d9176c9c65aebe0217ff1b23a.zip
Fixed "natives" test to work on my Mac.
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