[Ecls-list] ffi.lsp find-library patch

Dave hundo at yahoo.com
Fri Feb 18 16:05:36 UTC 2005


Below is a patch for ffi:find-foreign-library. It was failing in the call
to truename since it tries to access the path (which does not exist
for many of the search values). file-probe returns the truename or 'nil so
this seems to work a little better.

- Dave

--- ffi.lsp	26 Jan 2005 08:43:29 -0000	1.9
+++ ffi.lsp	18 Feb 2005 23:53:30 -0000
@@ -579,7 +579,7 @@
     (dolist (p directories)
       (dolist (n names)
         (dolist (e types)
-	  (let ((full-path (truename (make-pathname
+	  (let ((full-path (probe-file (make-pathname
 					  :device d
 	                                  :directory (etypecase p
 					               (pathname (pathname-directory p))
@@ -587,7 +587,7 @@
 						       (list p))
 					  :name n
 					  :type e))))
-	    (when (probe-file full-path)
+	    (when full-path
 	      (return-from find-foreign-library full-path))
 	  )))))
   nil)






More information about the ecl-devel mailing list