Changeset 10538

Show
Ignore:
Timestamp:
08/22/08 10:23:35 (3 months ago)
Author:
gb
Message:

Trunk changes to CLOSE-SHARED-LIBRARY.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/working-0711/ccl/level-1/linux-files.lisp

    r10399 r10538  
    552552 
    553553;;; Kind of has something to do with files, and doesn't work in level-0. 
    554 #+linux-target 
     554#+(or linux-target freebsd-target solaris-target) 
    555555(defun close-shared-library (lib &key (completely t)) 
    556556  "If completely is T, set the reference count of library to 0. Otherwise, 
     
    562562                    (error "Shared library ~s not found." lib)) 
    563563                (require-type lib 'shlib))) 
    564          (map (shlib.map lib))) 
    565     (unless (shlib.opened-by-lisp-kernel lib) 
    566       (when map 
     564         (handle (shlib.handle lib))) 
     565      (when handle 
    567566        (let* ((found nil) 
    568567               (base (shlib.base lib))) 
    569568          (do* () 
    570569               ((progn             
    571                   (#_dlclose map
     570                  (#_dlclose handle
    572571                  (or (not (setq found (shlib-containing-address base))) 
    573572                      (not completely))))) 
     
    575574            (setf (shlib.pathname lib) nil 
    576575              (shlib.base lib) nil 
     576              (shlib.handle lib) nil 
    577577              (shlib.map lib) nil) 
    578578            (unload-foreign-variables lib) 
    579             (unload-library-entrypoints lib))))))) 
     579            (unload-library-entrypoints lib)))))) 
    580580 
    581581#+darwin-target