anchor.diff:  (in-package :asdf)
  +
  +(export 'load-dso)
   
   (defun concatenate-strings (strings &optional delimiter)
     (if (not (rest strings))
  
positive.code:   t)
    
  
  
negative.code: 			      (module-components dso)))))
        (error 'operation-error :operation operation :component dso))))
  
  ;; Taken from foreign.lisp in the CMUCL tree, but modified to delay
  ;; resolving of symbols until they are used
  (defun load-dso (file)
    (system::ensure-lisp-table-opened)
    ; rtld global: so it can find all the symbols previously loaded
    ; rtld lazy: that way dlopen will not fail if not all symbols are defined.
    (let ((filename (namestring file)))
      (format t ";;; Loading shared library ~A ...~%" filename)
      (let ((sap (system::dlopen filename (logior system::rtld-lazy system::rtld-global))))
        (cond ((zerop (system:sap-int sap))
  	     (let ((err-string (system::dlerror)))
  
  	       ;; For some reason dlerror always seems to return NIL,
  	       ;; which isn't very informative.
  	       (error "Can't open object ~S: ~S" file err-string)))
  	    ((null (assoc sap system::*global-table* :test #'system:sap=))
  	     (setf system::*global-table* (acons sap file system::*global-table*))
  	     t)
  	    (t nil)))))
  
  
  (defmethod perform ((o load-op) (c unix-dso))
    (let ((co (make-instance 'compile-op)))
      (let ((filename (car (output-files co c))))
        (load-dso filename))))
  
  
  
  