X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=db-odbc%2Fodbc-loader.lisp;h=5d587190d25fe0809bc731cf0daeb6088153e6b2;hp=94206d8aa8342f1e270aef896a83cae0b6c1e891;hb=refs%2Ftags%2Fv3.8.6;hpb=b746611f6d622273f1563d9d0f65b59b58714694 diff --git a/db-odbc/odbc-loader.lisp b/db-odbc/odbc-loader.lisp index 94206d8..5d58719 100644 --- a/db-odbc/odbc-loader.lisp +++ b/db-odbc/odbc-loader.lisp @@ -7,7 +7,7 @@ ;;;; Programmers: Kevin M. Rosenberg ;;;; Date Started: April 2004 ;;;; -;;;; $Id: odbc-loader.lisp 8270 2003-11-25 06:37:14Z kevin $ +;;;; $Id$ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2004 by Kevin M. Rosenberg ;;;; @@ -18,19 +18,9 @@ (in-package #:odbc) -(defparameter *odbc-library-path* - (uffi:find-foreign-library - '("odbc32" "libodbc" "libiodbc") - `(,(make-pathname :directory (pathname-directory *load-truename*)) - #+64bit "/usr/lib64/" - "/usr/lib/" - "/sw/lib/" - "/usr/local/lib/" - "/home/kevin/debian/src/clsql/db-odbc/" - "/windows/system32/" - "/odbc/lib/opt/") - :drive-letters '("C"))) - +(defparameter *odbc-library-filenames* + '("odbc32" "libodbc" "libiodbc")) + (defvar *odbc-supporting-libraries* '("c") "Used only by CMU. List of library flags needed to be passed to ld to load the Odbc client library succesfully. If this differs at your site, @@ -39,15 +29,15 @@ set to the right path before compiling or loading the system.") (defvar *odbc-library-loaded* nil "T if foreign library was able to be loaded successfully") -(defmethod clsql-base:database-type-library-loaded ((database-type (eql :odbc))) +(defmethod clsql-sys:database-type-library-loaded ((database-type (eql :odbc))) *odbc-library-loaded*) - -(defmethod clsql-base:database-type-load-foreign ((database-type (eql :odbc))) - (uffi:load-foreign-library *odbc-library-path* - :module "odbc") + +(defmethod clsql-sys:database-type-load-foreign ((database-type (eql :odbc))) + (clsql-uffi:find-and-load-foreign-library *odbc-library-filenames* + :module "odbc") (setq *odbc-library-loaded* t)) -(clsql-base:database-type-load-foreign :odbc) +(clsql-sys:database-type-load-foreign :odbc)