From 55e1a4c1af5cb469357bb69543d89ad2dee48cc1 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Wed, 8 Jun 2005 16:44:05 +0000 Subject: [PATCH] r10568: * src/libraries.lisp: Commit patch from Edi Weitz to allow plain filename library names to allow underlying lisp implementation to find foreign libraries in the locations known to the operating system. --- ChangeLog | 8 ++++++++ debian/changelog | 6 ++++++ doc/ref_func_libr.xml | 5 ++++- src/libraries.lisp | 14 +++++++++----- src/package.lisp | 1 + 5 files changed, 28 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index dbca9fd..3ad8a33 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-06-09 Kevin Rosenberg (kevin@rosenberg.net) + * src/libraries.lisp: Commit patch from Edi Weitz to + allow plain filename library names to allow underlying + lisp implementation to find foreign libraries in the + locations known to the operating system. + * tests/cast.lisp: Add :module keyword as noted by + Joerg Hoehle. + 2005-04-12 Kevin Rosenberg (kevin@rosenberg.net) * Version 1.4.37 * src/strings.lisp: Fix variable name diff --git a/debian/changelog b/debian/changelog index f81d87c..232dfd4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +cl-uffi (1.4.38-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg Wed, 08 Jun 2005 10:42:10 -0600 + cl-uffi (1.4.37-1) unstable; urgency=low * New upstream diff --git a/doc/ref_func_libr.xml b/doc/ref_func_libr.xml index fd37a1c..499d11b 100644 --- a/doc/ref_func_libr.xml +++ b/doc/ref_func_libr.xml @@ -103,7 +103,10 @@ foreign function. If :void indicates module does not return A string or pathname specifying the library location in the filesystem. At least one implementation (&lw;) can not -accept a logical pathname. +accept a logical pathname. If this parameter denotes a pathname without a +directory component then most of the supported Lisp implementations will be +able to find the library themselves if it is located in one of the standard +locations as defined by the underlying operating system. diff --git a/src/libraries.lisp b/src/libraries.lisp index 942f764..3ca10da 100644 --- a/src/libraries.lisp +++ b/src/libraries.lisp @@ -81,10 +81,13 @@ library type if type is not specified." force-load) #+(or allegro mcl) (declare (ignore module supporting-libraries)) #+(or cmu scl sbcl) (declare (ignore module)) - - (when (and filename (probe-file filename)) - (if (pathnamep filename) ;; ensure filename is a string to check if - (setq filename (namestring filename))) ; already loaded + #+lispworks (declare (ignore supporting-libraries)) + + (when (and filename (or (null (pathname-directory filename)) + (probe-file filename))) + (if (pathnamep filename) ;; ensure filename is a string to check if already loaded + (setq filename (namestring (if (null (pathname-directory filename)) + filename (truename filename))))) (if (and (not force-load) (find filename *loaded-libraries* :test #'string-equal)) @@ -111,7 +114,8 @@ library type if type is not specified." (funcall (intern "LOAD-SHARED-OBJECT" :sb-alien) filename) (error c)))) - #+lispworks (fli:register-module module :real-name filename) + #+lispworks (fli:register-module module :real-name filename + :connection-style :immediate) #+allegro (load filename) #+openmcl (ccl:open-shared-library filename) #+(and mcl (not openmcl)) (ccl:add-to-shared-library-search-path filename t) diff --git a/src/package.lisp b/src/package.lisp index e25c9ce..33909ad 100644 --- a/src/package.lisp +++ b/src/package.lisp @@ -75,6 +75,7 @@ #:find-foreign-library #:load-foreign-library #:default-foreign-library-type + #:foreign-library-types ;; OS #:run-shell-command -- 2.34.1