2008-07-18 15:56:42 +02:00
|
|
|
$NetBSD: patch-aa,v 1.2 2008/07/18 13:56:42 obache Exp $
|
2006-10-27 22:43:26 +02:00
|
|
|
|
|
|
|
--- tests/data/library/foreign 2006/10/17 22:11:53 1.1
|
|
|
|
+++ tests/data/library/foreign 2006/10/17 22:13:42
|
|
|
|
@@ -5,11 +5,13 @@
|
|
|
|
libc = dyn_open("libc.so.6"); # Linux
|
|
|
|
if (is_void(libc)) libc = dyn_open("libc.so.1"); # Solaris
|
|
|
|
if (is_void(libc)) libc = dyn_open("libSystem.B.dylib"); # MacOS X
|
|
|
|
+if (is_void(libc)) libc = dyn_open("libc.so"); # catchall
|
|
|
|
if (is_void(libc)) exit(0);
|
|
|
|
|
|
|
|
libm = dyn_open("libm.so.6"); # Linux
|
|
|
|
if (is_void(libm)) libm = dyn_open("libm.so.1"); # Solaris
|
|
|
|
if (is_void(libm)) libm = dyn_open("libSystem.B.dylib"); # MacOS X
|
|
|
|
+if (is_void(libm)) libm = dyn_open("libm.so"); # catchall
|
|
|
|
if (is_void(libm)) exit(0);
|
|
|
|
|
|
|
|
|
|
|
|
@@ -29,9 +31,9 @@
|
|
|
|
|
2008-07-18 15:56:42 +02:00
|
|
|
# 3) call C function that takes and returns C double
|
2006-10-27 22:43:26 +02:00
|
|
|
|
|
|
|
-a = dyn_call_float(libm, "fabs", -2.5);
|
|
|
|
+#a = dyn_call_float(libm, "fabs", -2.5);
|
|
|
|
|
|
|
|
-if (a != 2.5) exit(3);
|
|
|
|
+#if (a != 2.5) exit(3);
|
|
|
|
|
|
|
|
|
|
|
|
# 4) call C function that takes string and returns int
|