chiark / gitweb /
Fix to avoid having to rely on internal _get_type functions
[clg] / tools / asdf-extensions.lisp
index 617b4b345dea217607dc2fb0122533f9d66b7648..6b3da9336b885ae2b3bd560be787a21b436dad2d 100644 (file)
@@ -54,7 +54,7 @@ (defmethod perform :after ((operation compile-op) (dso unix-dso))
 
 (defun load-dso (filename)
   #+sbcl(sb-alien:load-shared-object filename)
-  #+cmu(system::load-object-file filename))
+  #+cmu(ext:load-foreign filename))
 
 
 (defmethod perform ((o load-op) (c unix-dso))
@@ -100,8 +100,9 @@ (defmethod perform ((operation load-op) (c c-source-file))
   t)
   
 
+;;; Shared libraries
 
-(defclass library (static-file
+(defclass library (component
   ((libdir :initarg :libdir)))
 
 
@@ -119,3 +120,17 @@ (defmethod component-pathname ((lib library))
 
 (defmethod perform ((o load-op) (c library))
   (load-dso (component-pathname c)))
+
+(defmethod perform ((operation operation) (c library))
+  nil)
+
+(defmethod operation-done-p ((o load-op) (c library))
+  #+sbcl(find (sb-ext::unix-namestring (component-pathname c)) sb-alien::*shared-objects* :key #'sb-alien::shared-object-file :test #'equal)
+  #+cmu(rassoc (unix::unix-namestring (component-pathname c)) 
+       system::*global-table* 
+       :key #'(lambda (pathname)
+                (when pathname (unix::unix-namestring pathname)))
+       :test #'equal))
+
+(defmethod operation-done-p ((o operation) (c library))
+  t)