X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fforeign.lisp;h=96b0cde0827ee74353e5338e03eead031bbe2af9;hb=e33fb894f991b2926d8f3bace9058e4c0b2c3a37;hp=ac0df2330adb2ff3eedace62d777509e0f755345;hpb=898ced2a4d1f2503f3447f6408ddf5b05a906261;p=sbcl.git diff --git a/src/code/foreign.lisp b/src/code/foreign.lisp index ac0df23..96b0cde 100644 --- a/src/code/foreign.lisp +++ b/src/code/foreign.lisp @@ -108,12 +108,12 @@ (defvar *dso-linker-options* '("-G" "-o")) -(sb-alien:def-alien-routine dlopen system-area-pointer +(sb-alien:define-alien-routine dlopen system-area-pointer (file sb-c-call:c-string) (mode sb-c-call:int)) -(sb-alien:def-alien-routine dlsym system-area-pointer +(sb-alien:define-alien-routine dlsym system-area-pointer (lib system-area-pointer) (name sb-c-call:c-string)) -(sb-alien:def-alien-routine dlerror sb-c-call:c-string) +(sb-alien:define-alien-routine dlerror sb-c-call:c-string) ;;; Ensure that we've opened our own binary so we can dynamically resolve ;;; symbols in the C runtime. @@ -146,7 +146,7 @@ ld -shared -o /tmp/ffi-test.so /tmp/ffi-test.o then in SBCL do this: (LOAD-1-FOREIGN \"/tmp/ffi-test.so\") - (DEF-ALIEN-ROUTINE SUMMISH INT (X INT) (Y INT)) + (DEFINE-ALIEN-ROUTINE SUMMISH INT (X INT) (Y INT)) Now running (SUMMISH 10 20) should return 31. " (ensure-runtime-symbol-table-opened)