diff --git a/contrib/sb-gmp/gmp.lisp b/contrib/sb-gmp/gmp.lisp index 847b59cb3..d0a23a505 100644 --- a/contrib/sb-gmp/gmp.lisp +++ b/contrib/sb-gmp/gmp.lisp @@ -97,9 +97,7 @@ ;;; types and initialization -(define-alien-type gmp-limb - #-(and win32 64-bit) unsigned-long - #+(and win32 64-bit) unsigned-long-long) +(define-alien-type gmp-limb word) (deftype ui () #-(and win32 64-bit) 'sb-vm:word diff --git a/src/code/arena.lisp b/src/code/arena.lisp index 9e788f46e..a9b362866 100644 --- a/src/code/arena.lisp +++ b/src/code/arena.lisp @@ -115,8 +115,7 @@ one or more times, not to exceed MAX-EXTENSIONS times" (%primitive delete-arena arena) #-x86-64 (alien-funcall (extern-alien "sbcl_delete_arena" - (function void - unsigned-long)) + (function void word)) (get-lisp-obj-address arena)) ;; It is illegal to access the structure now, since that was in the arena. ;; So return an arbitrary success indicator. It might happen that you can accidentally diff --git a/src/code/target-c-call.lisp b/src/code/target-c-call.lisp index 12f973397..c24355191 100644 --- a/src/code/target-c-call.lisp +++ b/src/code/target-c-call.lisp @@ -34,6 +34,8 @@ (define-alien-type unsigned-long (unsigned #+win32 32 #-win32 #.sb-vm:n-machine-word-bits)) (define-alien-type unsigned-long-long (unsigned 64)) +(define-alien-type word (unsigned #.sb-vm:n-machine-word-bits)) +(define-alien-type signed-word (signed #.sb-vm:n-machine-word-bits)) (define-alien-type float single-float) (define-alien-type double double-float) diff --git a/src/cold/exports.lisp b/src/cold/exports.lisp index 6dc44a55e..4fe4ea653 100644 --- a/src/cold/exports.lisp +++ b/src/cold/exports.lisp @@ -1245,6 +1245,7 @@ of SBCL which maintained the CMU-CL-style split into two packages.)") "UNLOAD-SHARED-OBJECT" "UNSIGNED" "UNSIGNED-CHAR" "UNSIGNED-INT" "UNSIGNED-LONG" "UNSIGNED-LONG-LONG" "UNSIGNED-SHORT" + "WORD" "SIGNED-WORD" "UTF8-STRING" "VALUES" "VOID" diff --git a/tests/compiler-2.pure.lisp b/tests/compiler-2.pure.lisp index 338f1e8ca..fe6dec955 100644 --- a/tests/compiler-2.pure.lisp +++ b/tests/compiler-2.pure.lisp @@ -178,11 +178,10 @@ (sb-sys:with-pinned-objects (packed-int result) ;; Now exercise the C unpacker. ;; This hack of allocating 4 longs is terrible, but whatever. - (let ((unpacker (make-alien (signed #.sb-vm:n-word-bits) 4)) + (let ((unpacker (make-alien word 4)) (prev-loc 0)) (alien-funcall (extern-alien "varint_unpacker_init" - (function void (* long) - (unsigned #.sb-vm:n-word-bits))) + (function void (* word) word)) unpacker (sb-kernel:get-lisp-obj-address packed-int)) (sb-int:collect ((unpacked)) @@ -190,7 +189,7 @@ (let ((status (alien-funcall (extern-alien "varint_unpack" - (function int (* long) system-area-pointer)) + (function int (* word) system-area-pointer)) unpacker (sb-sys:vector-sap result)))) (let ((val (aref result 0))) ;; status of 0 is EOF, val = 0 means a decoded value was 0,