* Version 2.11.1 released: Much simpler Oracle client library loading.
Now uses ORACLE_HOME environmental variable as well as tests default
path for Oracle Instant Client.
+25 May 2004 Kevin Rosenberg <kevin@rosenberg.net>
+ * Version 2.11.1 released: Much simpler Oracle client library loading.
+ Now uses ORACLE_HOME environmental variable as well as tests default
+ path for Oracle Instant Client.
+
25 May 2004 Kevin Rosenberg <kevin@rosenberg.net>
* Version 2.11.0 released: Full Oracle support. All tests pass
* db-oracle/oracle-sql.lisp: Add declaration so that SBCL runs efficiently.
(defpackage #:clsql-oracle-system (:use #:asdf #:cl))
(in-package #:clsql-oracle-system)
-(eval-when (:compile-toplevel :load-toplevel :execute)
- #+common-lisp-controller (require 'uffi)
- #-common-lisp-controller (asdf:operate 'asdf:load-op 'uffi))
-
-(defvar *library-file-dir* (append (pathname-directory *load-truename*)
- (list "db-oracle")))
-
-(defclass clsql-oracle-source-file (c-source-file)
- ())
-
-(defmethod output-files ((o compile-op) (c clsql-oracle-source-file))
- (let* ((library-file-type
- (funcall (intern (symbol-name'#:default-foreign-library-type)
- (symbol-name '#:uffi))))
- (found (some #'(lambda (dir)
- (probe-file (make-pathname :directory dir
- :name (component-name c)
- :type library-file-type)))
- '((:absolute "usr" "lib" "clsql")))))
- (list (if found
- found
- (make-pathname :name (component-name c)
- :type library-file-type
- :directory *library-file-dir*)))))
-
-(defmethod perform ((o load-op) (c clsql-oracle-source-file))
- t)
-
-(defmethod operation-done-p ((o load-op) (c clsql-oracle-source-file))
- (and (symbol-function (intern (symbol-name '#:oracle-get-client-info)
- (find-package '#:oracle)))
- t))
-
-(defmethod perform ((o compile-op) (c clsql-oracle-source-file))
- (unless (operation-done-p o c)
- #-(or win32 mswindows)
- (unless (zerop (run-shell-command
- #-freebsd "cd ~A; make"
- #+freebsd "cd ~A; gmake"
- (namestring (make-pathname :name nil
- :type nil
- :directory *library-file-dir*))))
- (error 'operation-error :component c :operation o))))
-
-(defmethod operation-done-p ((o compile-op) (c clsql-oracle-source-file))
- (or (and (probe-file #p"/usr/lib/clsql/oracle.so") t)
- (let ((lib (make-pathname :defaults (component-pathname c)
- :type (uffi:default-foreign-library-type))))
- (and (probe-file lib)
- (> (file-write-date lib) (file-write-date (component-pathname c)))))))
-
-
;;; System definition
(defsystem clsql-oracle
include ../Makefile.common
-base=oracle
-shared_lib=$(base).so
-
-.PHONY: all
-all: $(shared_lib)
-
-$(shared_lib): Makefile make.sh
- CFLAGS="" LDFLAGS="" BASE=$(base) OBJECT=$(object) SOURCE=$(source) SHARED_LIB=$(shared_lib) sh make.sh
-
.PHONY: distclean
distclean: clean
- rm -f $(base).so
This is the header of the cadabra source file.
-
;;;; a CMUCL/OCI implementation of a subset of the DBI interface
;;;;
;;;; The original version of this code was copyright (c) 1999-2000 Cadabra Inc.
;;;; from the Oracle header files. Thus, changes in the header files
;;;; may require manual maintenance of the code. (This version was written
;;;; for Oracle 8.1.5.)
-;;;; * various KLUDGEs noted in the code
-
-;;;; log:
-;;;; 6. * moved test suite to separate file
-;;;; * removed trailing spaces from all strings returned from database
-;;;; * fixed error in LIST-ALL-DATABASE-TABLES interface: DB should be
-;;;; a &KEY argument, not an &OPTIONAL argument
-;;;; 7. * merged Winton's code to allow the SQL function to ask OCI
-;;;; whether an operation returns a table, and not to worry about
-;;;; the TYPE keyword argument if no table is returned
-;;;; * reduced +N-BUF-ROWS+ from 1000 to reduce probability of
-;;;; hitting CMUCL 18b 8Mb-of-C-data limit
-;;;; * changed NOT-USED argument of FETCH-ROW to EOF-ERRORP, to
-;;;; conform to Allegro interface
-;;;; * found apparent bug in OCI (wrong size of value returned for the
-;;;; +oci-attr-data-size+ attribute); added workaround
-;;;; * found and documented the unnecessariness of "workaround" for
-;;;; "WITH-ALIEN not working" (which was actually a conceptual error
-;;;; on WHN's part, expecting WITH-ALIEN to work the same way as
-;;;; MAKE-ALIEN, not expecting one less level of indirection)
-;;;; * cleaned up NULLS-OK-USE-THIS-ERRHP weirdness and inflexibility,
-;;;; splitting the one argument into separate NULLS-OK and ERRHP
-;;;; arguments
-;;;; * added :ERRHP optional arguments to various OERR expressions,
-;;;; so that now failures are more likely to generate informative
-;;;; error messages instead of just "OCI Error (and no ERRHP
-;;;; available to find subcode)"
-;;;; 8. * added code to deallocate C resources
-;;;; 9. * Added in an extra field for DATE-FORMAT and DATE-FORMAT-LENGTH
-;;;; Munged the code for datatype and colsize. Winton Davies.
-;;;; 10. * cleaned up remnants of old date-is-fixed-length-field design
-;;;; assumption, getting rid of +OCi-date-bytes+
-;;;; * reduced consing in FETCH-ROW and associated functions
-;;;; * replaced WARN with IWARN for implementor-only warnings
-;;;; 11. * fixed bad (THE (ALIEN (* FLOAT)) B) declaration for
-;;;; SQLT_FLT buffers (should be (ALIEN (* DOUBLE)) instead;
-;;;; and for some reason fell through the cracks of CMUCL's
-;;;; "declarations are assertions" principle)
-;;;; * deleted various FIXME notes a la "does this code ever get
-;;;; exercised?" and "are these really all the cases we need?"
-;;;; * changed the IWARN call to a KLUDGE comment, deleted IWARN
-;;;; * tidied up comments
-;;;; * changed page breaks from lots-of-semicolons Cadabra style
-;;;; to ^L CMUCL style
-;;;; * declared DBI-ERROR to be INLINE
-;;;; * fixed definition of +oci-htype-env+
-;;;; * reviewed and corrected C resource deallocation code
-;;;; 12. * Made load-foreign depend on ORACLE-HOME for more portability.
-
+++ /dev/null
-# Make shared library for Oracle 10
-
-if [ -z "$ORACLE_HOME" ]; then
- ORACLE_HOME=/10g/app/product/10.1.0/db_1
-fi
-
-EMPTY_LIBS=-lclntst10
-LIBS="-lagent10 -lagtsh -lclntsh -lclient10 -lvsn10 -lcommon10 -lskgxp10 -lmm -lnls10 -lcore10 -lgeneric10 -ldl -lgcc -lm"
-OBJECTS="rdbms/lib/defopt.o"
-LIBNAME=oracle
-
-gcc -shared -L $ORACLE_HOME -L ${ORACLE_HOME}/lib $ORACLE_HOME/rdbms/lib/homts.o $LIBS -o ${LIBNAME}.so
+++ /dev/null
-# Make shared library for Oracle 9
-
-if [ -z "$ORACLE_HOME" ]; then
- ORACLE_HOME=/9i
-fi
-
-EMPTY_LIBS=-lclntst9
-LIBS="-lagent9 -lagtsh -lclntsh -lclntst9 -lclient9 -lvsn9 -lcommon9 -lskgxp9 -lmm -lnls9 -lcore9 -lgeneric9 -ltrace9 -ldl -lgcc -lm"
-OBJECTS="rdbms/lib/defopt.o"
-LIBNAME=oracle
-
-gcc -shared ${ORACLE_HOME}/rdbms/lib/homts.o -L ${ORACLE_HOME}/lib $LIBS -o ${LIBNAME}.so
(in-package #:clsql-oracle)
(defparameter *oracle-lib-path*
- (let ((oracle-home (getenv "ORACLE_HOME")))
- (when oracle-home
- (make-pathname :directory
- (append
- (pathname-directory
- (parse-namestring (concatenate 'string oracle-home "/")))
+ (let ((oracle-home (getenv "ORACLE_HOME")))
+ (when oracle-home
+ (make-pathname :directory
+ (append
+ (pathname-directory
+ (parse-namestring (concatenate 'string oracle-home "/")))
(list "lib"))))))
-(defparameter *clsql-oracle-library-path*
+(defparameter *oracle-client-library-path*
(uffi:find-foreign-library
- '("libclntsh" "oracle")
+ "libclntsh"
`(,@(when *load-truename* (list (make-pathname :directory (pathname-directory *load-truename*))))
,@(when *oracle-lib-path* (list *oracle-lib-path*))
- "/9i/lib/"
- "/usr/lib/clsql/"
- "/sw/lib/clsql/"
- "/home/kevin/debian/src/clsql/db-oracle/")
+ "/usr/lib/oracle/10.1.0.2/client/lib/")
:drive-letters '("C")))
-(defvar *oracle-library-candidate-drive-letters* '("C" "D" "E"))
-
(defvar *oracle-supporting-libraries* '("c")
"Used only by CMU. List of library flags needed to be passed to ld to
load the Oracle client library succesfully. If this differs at your site,
(defmethod clsql-sys:database-type-library-loaded ((database-type (eql :oracle)))
*oracle-library-loaded*)
-(setf *oracle-lib-path* #p"/usr/lib/oracle/10.1.0.2/client/lib/")
-
(defmethod clsql-sys:database-type-load-foreign ((database-type (eql :oracle)))
- #+ignore
- (uffi:load-foreign-library
- (make-pathname :defaults *oracle-lib-path* :name "libclntsh" :type "so"))
- (uffi:load-foreign-library *clsql-oracle-library-path*
- :module "clsql-oracle"
- :supporting-libraries *oracle-supporting-libraries*)
- (setq *oracle-library-loaded* t))
-
+ (if (pathnamep *oracle-client-library-path*)
+ (progn
+ (uffi:load-foreign-library *oracle-client-library-path*
+ :module "clsql-oracle"
+ :supporting-libraries
+ *oracle-supporting-libraries*)
+ (setq *oracle-library-loaded* t))
+ (warn "Unable to load oracle client library.")))
(clsql-sys:database-type-load-foreign :oracle)
+cl-sql (2.11.1-1) unstable; urgency=low
+
+ * New upstream
+
+ -- Kevin M. Rosenberg <kmr@debian.org> Tue, 25 May 2004 02:38:21 -0600
+
cl-sql (2.11.0-1) unstable; urgency=low
* New upstream