patch: clsql-uffi.asd fixes

James Bielman <[email protected]> Sat, 12 Nov 2005 06:20:15 -0800
Newsgroups gmane.lisp.clsql.devel
Message-ID <[email protected]>
Hi,

I'm pleased to report that I've converted a largeish CommonSQL  
application
over to CLSQL (on LispWorks, I still have Oracle segfaults on SBCL  
which I
am trying to track down).

This patch fixes a couple of quirks I noticed when loading the clsql- 
uffi system:

12 Nov 2005 James Bielman <[email protected]>
    * clsql-uffi.asd: Remove reference to symbols in the UFFI package  
as it may
    not be present at read time.  Fixes an error when loading a CLSQL  
backend
    (or ASDF-INSTALL'ing CLSQL) when UFFI is not loaded.

    * Change the name of :clsql-uffi-source-file "uffi" to  
"clsql_uffi" to
    match the new name of the support library.  Fixes unnecessary  
recompilation
    of the source files depending on the shared library.

James

--- clsql-3.4.1/clsql-uffi.asd	2005-11-04 11:13:02.000000000 -0800
+++ /home/jamesjb/.sbcl/site/clsql-3.4.1/clsql-uffi.asd	2005-11-12  
06:01:06.000000000 -0800
@@ -67,7 +67,8 @@
(defmethod operation-done-p ((o compile-op) (c clsql-uffi-source-file))
    (or (and (probe-file #p"/usr/lib/clsql/clsql_uffi.so") t)
        (let ((lib (make-pathname :defaults (component-pathname c)
-				:type (uffi:default-foreign-library-type))))
+				:type (funcall (intern (symbol-name '#:default-foreign-library- 
type)
+                                                       (find-package  
'#:uffi))))))
	(and (probe-file lib) (probe-file (component-pathname c))
	     (> (file-write-date lib) (file-write-date (component-pathname  
c)))))))

@@ -85,6 +86,6 @@
    ((:module :uffi
	    :components
	    ((:file "clsql-uffi-package")
-	     (:clsql-uffi-source-file "uffi" :depends-on ("clsql-uffi- 
package"))
-	     (:file "clsql-uffi-loader" :depends-on ("clsql-uffi-package"  
"uffi"))
+	     (:clsql-uffi-source-file "clsql_uffi" :depends-on ("clsql-uffi- 
package"))
+	     (:file "clsql-uffi-loader" :depends-on ("clsql-uffi-package"  
"clsql_uffi"))
	     (:file "clsql-uffi" :depends-on ("clsql-uffi-loader"))))))