chiark / gitweb /
Changes for CLISP
authorespen <espen>
Wed, 29 Mar 2006 10:01:30 +0000 (10:01 +0000)
committerespen <espen>
Wed, 29 Mar 2006 10:01:30 +0000 (10:01 +0000)
tools/asdf-extensions.lisp

index b7a589bffb7bb7a650eae5ae2c808992bab22680..93be2d353f813a313bc6fb7188de130dc82f7b56 100644 (file)
@@ -51,10 +51,16 @@ (defmethod perform :after ((operation compile-op) (dso unix-dso))
                              (module-components dso)))))
       (error 'operation-error :operation operation :component dso))))
 
+#+clisp
+(defvar *loaded-libraries* ())
 
 (defun load-dso (filename)
   #+sbcl(sb-alien:load-shared-object filename)
-  #+cmu(ext:load-foreign filename))
+  #+cmu(ext:load-foreign filename)
+  #+clisp
+  (unless (find filename *loaded-libraries* :test #'equal)
+    (ffi::foreign-library (namestring filename))
+    (push filename *loaded-libraries*)))
 
 
 (defmethod perform ((o load-op) (c unix-dso))
@@ -135,7 +141,8 @@ (defmethod operation-done-p ((o load-op) (c library))
        system::*global-table* 
        :key #'(lambda (pathname)
                 (when pathname (unix::unix-namestring pathname)))
-       :test #'equal))
+       :test #'equal)
+  #+clisp(find (component-pathname c) *loaded-libraries* :test #'equal))
 
 (defmethod operation-done-p ((o operation) (c library))
   t)