+cl-uffi (1.0.0-1) unstable; urgency=low
+
+ * Initial SBCL compatibility
+
+ -- Kevin M. Rosenberg <kmr@debian.org> Sun, 13 Oct 2002 19:01:31 -0600
+
cl-uffi (0.9.2-1) unstable; urgency=high
* Add AUTHORS file
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Feb 2002
;;;;
-;;;; $Id: functions.lisp,v 1.3 2002/10/14 01:51:15 kevin Exp $
+;;;; $Id: functions.lisp,v 1.4 2002/10/14 03:07:41 kevin Exp $
;;;;
;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
,result-type
,@function-args)
#+sbcl
- `(sb-alien:def-alien-routine (,foreign-name ,lisp-name)
+ `(sb-alien:define-alien-routine (,foreign-name ,lisp-name)
,result-type
,@function-args)
#+lispworks
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Feb 2002
;;;;
-;;;; $Id: libraries.lisp,v 1.2 2002/10/14 01:51:15 kevin Exp $
+;;;; $Id: libraries.lisp,v 1.3 2002/10/14 03:07:41 kevin Exp $
;;;;
;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
(find filename *loaded-libraries* :test #'string-equal))
t ;; return T, but don't reload library
(progn
- (when
- #+cmu
- (let ((type (pathname-type (parse-namestring filename))))
- (if (equal type "so")
- (sys::load-object-file filename)
- (alien:load-foreign filename
- :libraries
- (convert-supporting-libraries-to-string
- supporting-libraries))))
- #+sbcl
- (sb-alien:load-foreign filename
- :libraries
+ #+cmu
+ (let ((type (pathname-type (parse-namestring filename))))
+ (if (equal type "so")
+ (sys::load-object-file filename)
+ (alien:load-foreign filename
+ :libraries
+ (convert-supporting-libraries-to-string
+ supporting-libraries))))
+ #+sbcl
+ (sb-alien:load-foreign filename
+ :libraries
(convert-supporting-libraries-to-string
supporting-libraries))
- #+lispworks (fli:register-module module :real-name filename)
- #+allegro (load filename)
- #+openmcl (ccl:open-shared-library filename)
- #+(and mcl (not openmcl)) (ccl:add-to-shared-library-search-path filename t)
-
- (push filename *loaded-libraries*)
- t)))))
+ #+lispworks (fli:register-module module :real-name filename)
+ #+allegro (load filename)
+ #+openmcl (ccl:open-shared-library filename)
+ #+(and mcl (not openmcl)) (ccl:add-to-shared-library-search-path filename t)
+
+ (push filename *loaded-libraries*)
+ t))))
(defun convert-supporting-libraries-to-string (libs)
(let (lib-load-list)
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Sep 2002
;;;;
-;;;; $Id: os.lisp,v 1.1 2002/10/14 01:51:15 kevin Exp $
+;;;; $Id: os.lisp,v 1.2 2002/10/14 03:07:41 kevin Exp $
;;;;
;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg.
;;;; Much of this code was taken from other open source project and copyright
(sb-impl::process-exit-code
(sb-ext:run-program
"/bin/sh"
- (list "-c" command)
+ (list "-c" command)
:input nil :output *trace-output*))
#+(or cmu scl)
(ext:process-exit-code
(ext:run-program
"/bin/sh"
- (list "-c" command)
+ (list "-c" command)
:input nil :output *trace-output*))
#+allegro
;; OS
#:run-shell-command
))
+
+
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Feb 2002
;;;;
-;;;; $Id: strings.lisp,v 1.2 2002/10/14 01:51:15 kevin Exp $
+;;;; $Id: strings.lisp,v 1.3 2002/10/14 03:07:41 kevin Exp $
;;;;
;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
#+sbcl
(let ((array-def (gensym)))
`(let ((,array-def (list 'sb-alien:array 'char ,size)))
- (eval `(alien:cast (sb-alien:make-alien ,,array-def)
+ (eval `(sb-alien:cast (sb-alien:make-alien ,,array-def)
,(if ,unsigned
'(* (sb-alien:unsigned 8))
'(* (sb-alien:signed 8)))))))
;; Modified from CMUCL's source to handle non-null terminated strings
#+cmu
-(defun cmucl-naturalize-cstring (sap &key
- length
- (null-terminated-p t))
+(defun cmucl-naturalize-cstring (sap &key length (null-terminated-p t))
(declare (type system:system-area-pointer sap))
(locally
(declare (optimize (speed 3) (safety 0)))
result)))
#+sbcl
-(defun sbcl-naturalize-cstring (sap &key
- length
- (null-terminated-p t))
+(defun sbcl-naturalize-cstring (sap &key length (null-terminated-p t))
(declare (type sb-sys:system-area-pointer sap))
(locally
(declare (optimize (speed 3) (safety 0)))
(when null-terminated-p
(loop
for offset of-type fixnum upfrom 0
- until (zerop (system:sap-ref-8 sap offset))
+ until (zerop (sb-sys:sap-ref-8 sap offset))
finally (return offset)))))
(if length
(if (and null-terminated-length
(let ((result (make-string length)))
(sb-kernel:copy-from-system-area sap 0
result (* sb-vm:vector-data-offset
- sb-vm:word-bits)
- (* length sb-vm:byte-bits))
+ sb-vm:n-word-bits)
+ (* length sb-vm:n-byte-bits))
result)))
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Aug 2002
;;;;
-;;;; $Id: uffi.asd,v 1.18 2002/10/01 17:05:29 kevin Exp $
+;;;; $Id: uffi.asd,v 1.19 2002/10/14 03:07:41 kevin Exp $
;;;;
;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
(declaim (optimize (debug 3) (speed 3) (safety 1) (compilation-speed 0)))
(in-package :asdf)
-#+(or allegro lispworks cmu mcl cormanlisp)
+#+(or allegro lispworks cmu mcl cormanlisp sbcl)
(defsystem uffi
:name "cl-uffi"
:author "Kevin M. Rosenberg <kmr@debian.org>"
- :version "0.7.2"
+ :version "1.0.0"
:maintainer "Kevin M. Rosenberg <kmr@debian.org>"
:licence "Lessor Lisp General Public License"
:description "Universal Foreign Function Library for Common Lisp"
(:file "objects" :depends-on ("primitives"))
(:file "aggregates" :depends-on ("primitives"))
(:file "functions" :depends-on ("primitives"))
- (:file "libraries" :depends-on ("package"))))
+ (:file "libraries" :depends-on ("package"))
+ (:file "os" :depends-on ("package"))))
#+cormanlisp
(:module :src-corman
:components
((:file "uffi-corman")))
))
-#+(or allegro lispworks cmu mcl cormanlisp)
+#+(or allegro lispworks cmu mcl cormanlisp sbcl)
(when (ignore-errors (find-class 'load-compiled-op))
(defmethod perform :after ((op load-compiled-op) (c (eql (find-system :uffi))))
(pushnew :uffi cl:*features*)))