r5493: *** empty log message ***
[uffi.git] / src / libraries.lisp
index 65f9f5707fac06d697c194aa0829de6db9d59d01..ff14928674c5cd4c438b3aed24b69eacfc69ed5d 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Feb 2002
 ;;;;
-;;;; $Id: libraries.lisp,v 1.8 2003/06/26 18:02:08 kevin Exp $
+;;;; $Id: libraries.lisp,v 1.9 2003/07/08 12:37:21 kevin Exp $
 ;;;;
 ;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
@@ -98,12 +98,13 @@ library type if type is not specified."
                              (convert-supporting-libraries-to-string
                               supporting-libraries)))
        #+sbcl
-       (if (string-equal type "so")
-           (sb-alien::load-1-foreign filename)
-           (sb-alien:load-foreign filename 
-                                  :libraries
-                                  (convert-supporting-libraries-to-string
-                                   supporting-libraries)))
+       (let ((type (pathname-type (parse-namestring filename))))
+         (if (string-equal type "so")
+             (sb-alien::load-1-foreign filename)
+             (sb-alien:load-foreign filename 
+                                    :libraries
+                                    (convert-supporting-libraries-to-string
+                                     supporting-libraries))))
        #+lispworks (fli:register-module module :real-name filename)
        #+allegro (load filename)
        #+openmcl (ccl:open-shared-library filename)