X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fforeign.test.sh;h=177d170089b833904ce44eaf1ae71f474609e26a;hb=1d9fe1f6d7d64aa05993d414c1cd683a2ce231cc;hp=034deef842b9f03204ecd4ff36881a84f111f9cc;hpb=a42922aef908a1b45ae5420d51b2ca7ee1bafb9e;p=sbcl.git diff --git a/tests/foreign.test.sh b/tests/foreign.test.sh index 034deef..177d170 100644 --- a/tests/foreign.test.sh +++ b/tests/foreign.test.sh @@ -14,7 +14,9 @@ # absolutely no warranty. See the COPYING and CREDITS files for # more information. +. ./expect.sh . ./subr.sh + use_test_subdirectory echo //entering foreign.test.sh @@ -28,19 +30,7 @@ PUNT=$EXIT_TEST_WIN build_so() ( echo building $1.so - set +u - case "`uname -m`" in - x86_64|amd64|mips|mips64) - CFLAGS="$CFLAGS -fPIC" - ;; - esac - if [ "`uname`" = Darwin ]; then - SO_FLAGS="-bundle" - else - SO_FLAGS="-shared" - fi - cc -c $1.c -o $1.o $CFLAGS - ld $SO_FLAGS -o $1.so $1.o + /bin/sh ../run-compiler.sh -sbcl-pic -sbcl-shared "$1.c" -o "$1.so" ) # We want to bail out in case any of these Unix programs fails. @@ -97,6 +87,14 @@ int long_test2(int i1, int i2, int i3, int i4, int i5, int i6, return (l1 == (1 + powish(2,37))); } +int long_sap_test1(int *p1, long long l1) { + return (l1 == (3 + powish(2,*p1))); +} + +int long_sap_test2(int *p1, int i1, long long l1) { + return (l1 == (3 + powish(2,*p1))); +} + long long return_long_long() { return powish(2,33); } @@ -124,13 +122,13 @@ cat > $TEST_FILESTEM.base.lisp < $TEST_FILESTEM.base.lisp < $TEST_FILESTEM.test.lisp < $TEST_FILESTEM.test.lisp < $TEST_FILESTEM.test.lisp < $TEST_FILESTEM.addr.heap.c < $TEST_FILESTEM.alien.enum.lisp <