Ignore:
Timestamp:
Feb 22, 2011, 11:34:32 AM (9 years ago)
Author:
gb
Message:

lispequ.lisp: make SHLIB fields available to DESCRIBE/INSPECT.
l0-cfm-support.lisp, linux-files.lisp: shared library changes (mostly

Darwin-related).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-1/linux-files.lisp

    r14648 r14656  
    10001000                    (error "Shared library ~s not found." lib))
    10011001                (require-type lib 'shlib)))
    1002          (handle (shlib.handle lib)))
     1002         (handle (shlib.handle lib))
     1003         (opencount (shlib.opencount lib)))
    10031004      (when handle
    1004         (let* ((found nil))
    1005           (do* ()
    1006                ((progn
    1007                   #-windows-target (#_dlclose handle)
    1008                   #+windows-target (#_FreeLibrary handle)
    1009                   (or (not (setq found
    1010                                  (%probe-shared-library lib)))
    1011                       (not completely)))))
    1012           (when (not found)
    1013             (setf (shlib.pathname lib) nil
    1014                   (shlib.base lib) nil
    1015                   (shlib.handle lib) nil
    1016                   (shlib.map lib) nil)
    1017             (unload-foreign-variables nil)
    1018             (unload-library-entrypoints nil))))))
     1005        (dotimes (i (if completely opencount 1))
     1006          (unless #-windows-target (eql 0 (#_dlclose handle))
     1007                  #+windows-target (not (eql 0(#_FreeLibrary handle)))
     1008                  (return))
     1009          (decf (shlib.opencount lib)))
     1010        (when (and (eql 0 (shlib.opencount lib))
     1011                   (not (%probe-shared-library lib)))
     1012          (setf (shlib.pathname lib) nil
     1013                (shlib.base lib) nil
     1014                (shlib.handle lib) nil
     1015                (shlib.map lib) nil)
     1016          (unload-foreign-variables nil)
     1017          (unload-library-entrypoints nil)))))
    10191018
    10201019
Note: See TracChangeset for help on using the changeset viewer.