r10568: * src/libraries.lisp: Commit patch from Edi Weitz to
authorKevin M. Rosenberg <kevin@rosenberg.net>
Wed, 8 Jun 2005 16:44:05 +0000 (16:44 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Wed, 8 Jun 2005 16:44:05 +0000 (16:44 +0000)
        allow plain filename library names to allow underlying
        lisp implementation to find foreign libraries in the
        locations known to the operating system.

ChangeLog
debian/changelog
doc/ref_func_libr.xml
src/libraries.lisp
src/package.lisp

index dbca9fdd4b369bd1b34fccbd64e4d0264e838eb0..3ad8a33d6e038aa259607e70fc4a05500dfec631 100644 (file)
--- 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
index f81d87cfddcbd3e5d17020095c0b61daa76098a5..232dfd4e78066da95f0feef9e621760210bc54a3 100644 (file)
@@ -1,3 +1,9 @@
+cl-uffi (1.4.38-1) unstable; urgency=low
+
+  * New upstream
+
+ -- Kevin M. Rosenberg <kmr@debian.org>  Wed, 08 Jun 2005 10:42:10 -0600
+
 cl-uffi (1.4.37-1) unstable; urgency=low
 
   * New upstream
index fd37a1c8630d23fa31e42e9b87c6ddfe5f418f67..499d11b9e5dcab65ee70531b01537dc9d8197bab 100644 (file)
@@ -103,7 +103,10 @@ foreign function. If <constant>:void</constant> indicates module does not return
            <listitem>
              <para>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.
              </para>
            </listitem>
          </varlistentry>
index 942f764b4ca53bc8a79ceccf8ee1e990f4d9c8a9..3ca10dac05b35b1ba1ad9aed57e61b2aa90f7122 100644 (file)
@@ -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)
index e25c9cef71b1403544324b2e506ae5e16e22c6cb..33909adcd4a84d535237b5c5e9ca2e3daffac5d3 100644 (file)
@@ -75,6 +75,7 @@
    #:find-foreign-library
    #:load-foreign-library
    #:default-foreign-library-type
+   #:foreign-library-types
 
    ;; OS
    #:run-shell-command