r11014: 12 Aug 2006 Kevin Rosenberg <kevin@rosenberg.net>
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 12 Aug 2006 19:43:22 +0000 (19:43 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 12 Aug 2006 19:43:22 +0000 (19:43 +0000)
* Version 3.6.4
* clsql.asd: Add support for c:\etc\clsql-init.lisp as possible
local initialization file
* db-mysql/mysql-loader.lisp: Remove former method of using pathnames
as name candidates.
* db-odbc/odbc-api.lisp: Work-around Allegro/Windows FFI bug
that generates incorrect integer return type

ChangeLog
clsql.asd
db-mysql/mysql-loader.lisp
db-odbc/odbc-api.lisp
debian/changelog

index be823f7850453da0707ac52fd8d0666712c2c16c..65d2952689463b4e996649168b2156c2ecf3de33 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+12 Aug 2006  Kevin Rosenberg <kevin@rosenberg.net>
+       * Version 3.6.4
+       * clsql.asd: Add support for c:\etc\clsql-init.lisp as possible
+       local initialization file
+       * db-mysql/mysql-loader.lisp: Remove former method of using pathnames
+       as name candidates.
+       * db-odbc/odbc-api.lisp: Work-around Allegro/Windows FFI bug
+       that generates incorrect integer return type
+       
 07 Jul 2006  Kevin Rosenberg <kevin@rosenberg.net>
        * Version 3.6.3
        * sql/transactions.lisp: Important typo fix from Alexey Antipov
 07 Jul 2006  Kevin Rosenberg <kevin@rosenberg.net>
        * Version 3.6.3
        * sql/transactions.lisp: Important typo fix from Alexey Antipov
index c70fd787e5c8696dc3d8093715527f3dbae134f6..2f3868cf2abcec104b360a565376bda7c3595303 100644 (file)
--- a/clsql.asd
+++ b/clsql.asd
@@ -18,7 +18,7 @@
 (defpackage #:clsql-system (:use #:asdf #:cl))
 (in-package #:clsql-system)
 
 (defpackage #:clsql-system (:use #:asdf #:cl))
 (in-package #:clsql-system)
 
-;; need to load uffi for below perform :after method 
+;; need to load uffi for below perform :after method
 (eval-when (:compile-toplevel :load-toplevel :execute)
   (unless (find-package 'uffi)
     (asdf:operate 'asdf:load-op 'uffi)))
 (eval-when (:compile-toplevel :load-toplevel :execute)
   (unless (find-package 'uffi)
     (asdf:operate 'asdf:load-op 'uffi)))
@@ -92,6 +92,8 @@ oriented interface."
 (defmethod perform :after ((o load-op) (c (eql (find-system 'clsql))))
   (let* ((init-var (uffi:getenv "CLSQLINIT"))
          (init-file (or (when init-var (probe-file init-var))
 (defmethod perform :after ((o load-op) (c (eql (find-system 'clsql))))
   (let* ((init-var (uffi:getenv "CLSQLINIT"))
          (init-file (or (when init-var (probe-file init-var))
-                        (probe-file "/etc/clsql-init.lisp"))))
+                        (probe-file "/etc/clsql-init.lisp")
+                        #+(or mswin windows win32)
+                        (probe-file "c:\\etc\\clsql-init.lisp"))))
     (when init-file (load init-file))))
 
     (when init-file (load init-file))))
 
index b102fcbdade60dc945193ece7b7ca4551d1310fe..aa903222a62627e7294e4e3a74819752c4f67826 100644 (file)
 
 (in-package #:mysql)
 
 
 (in-package #:mysql)
 
-(defparameter *clsql-mysql-library-candidate-names* 
+(defparameter *clsql-mysql-library-candidate-names*
   (list #+(or 64bit x86-64) "clsql_mysql64"
   (list #+(or 64bit x86-64) "clsql_mysql64"
-        #+(or 64bit x86-64) (make-pathname :name "clsql_mysql64"
-                                           :directory (pathname-directory *load-truename*))
-        "clsql_mysql"
-        (make-pathname :name "clsql_mysql"
-                       :directory (pathname-directory *load-truename*))))
+        "clsql_mysql"))
 
 (defvar *mysql-library-candidate-names*
   '("libmysqlclient" "libmysql"))
 
 (defvar *mysql-library-candidate-names*
   '("libmysqlclient" "libmysql"))
@@ -39,13 +35,13 @@ set to the right path before compiling or loading the system.")
 
 (defmethod clsql-sys:database-type-library-loaded ((database-type (eql :mysql)))
   *mysql-library-loaded*)
 
 (defmethod clsql-sys:database-type-library-loaded ((database-type (eql :mysql)))
   *mysql-library-loaded*)
-                                     
+
 (defmethod clsql-sys:database-type-load-foreign ((database-type (eql :mysql)))
   (clsql-uffi:find-and-load-foreign-library *mysql-library-candidate-names*
 (defmethod clsql-sys:database-type-load-foreign ((database-type (eql :mysql)))
   (clsql-uffi:find-and-load-foreign-library *mysql-library-candidate-names*
-                                            :module "mysql" 
+                                            :module "mysql"
                                             :supporting-libraries *mysql-supporting-libraries*)
   (clsql-uffi:find-and-load-foreign-library *clsql-mysql-library-candidate-names*
                                             :supporting-libraries *mysql-supporting-libraries*)
   (clsql-uffi:find-and-load-foreign-library *clsql-mysql-library-candidate-names*
-                                            :module "clsql-mysql" 
+                                            :module "clsql-mysql"
                                             :supporting-libraries *mysql-supporting-libraries*)
   (setq *mysql-library-loaded* t))
 
                                             :supporting-libraries *mysql-supporting-libraries*)
   (setq *mysql-library-loaded* t))
 
index 1896a4727d60f35b514bb8591f056cde77d24e4e..4719d7391ecf66bc0423a88391d4aad5a9611b0c 100644 (file)
@@ -99,6 +99,17 @@ as possible second argument) to the desired representation of date/time/timestam
                                    odbc-call &body body)
   (let ((result-code (gensym "RC-")))
     `(let ((,result-code ,odbc-call))
                                    odbc-call &body body)
   (let ((result-code (gensym "RC-")))
     `(let ((,result-code ,odbc-call))
+
+      ;; Check for allegro v7 & v8 bug with ODBC calls returning
+      ;; 32-bit unsigned ints, not 16-bit signed ints
+      #+(and allegro mswindows)
+      (when (> ,result-code #xFFFF)
+        (warn (format nil "16-bit return bug: result-code #x~X for expression ~S"
+                      ,result-code (quote ,odbc-call)))
+        (setq ,result-code (logand ,result-code #xFFFF))
+        (when (> ,result-code #x7FFF)
+          (setq ,result-code (- ,result-code #x10000))))
+
        (case ,result-code
          (#.$SQL_SUCCESS
           (progn ,result-code ,@body))
        (case ,result-code
          (#.$SQL_SUCCESS
           (progn ,result-code ,@body))
@@ -132,8 +143,7 @@ as possible second argument) to the desired representation of date/time/timestam
             :secondary-error-id sql-state)))
         (#.$SQL_NO_DATA_FOUND
          (progn ,result-code ,@body))
             :secondary-error-id sql-state)))
         (#.$SQL_NO_DATA_FOUND
          (progn ,result-code ,@body))
-        ;; work-around for Allegro 7.0beta AMD64 which
-        ;; has for negative numbers
+        ;; work-around for Allegro 7.0beta AMD64 which returns negative numbers
         (otherwise
          (multiple-value-bind (error-message sql-state)
              (handle-error (or ,henv +null-handle-ptr+)
         (otherwise
          (multiple-value-bind (error-message sql-state)
              (handle-error (or ,henv +null-handle-ptr+)
index 5181d0f67319bb8ad2dc41e466098347d3d0462d..6719c0f572567d628745846cc3555453a5a11107 100644 (file)
@@ -1,3 +1,9 @@
+cl-sql (3.6.4-1) unstable; urgency=low
+
+  * New upstream
+
+ -- Kevin M. Rosenberg <kmr@debian.org>  Sat, 12 Aug 2006 10:18:05 -0600
+
 cl-sql (3.6.3-1) unstable; urgency=low
 
   * New upstream
 cl-sql (3.6.3-1) unstable; urgency=low
 
   * New upstream