X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=db-odbc%2Fodbc-loader.lisp;h=16f1ec1a304da72eccd921700764ac2c7654ebfe;hp=eb045477d1da0cfe97b10ebbe69f1a932a14d3ea;hb=d2d49ab13c98bc7a1819a0fd3968268a5567bdc3;hpb=5148be446aee32ec705beac3fbba35f499df4fd4 diff --git a/db-odbc/odbc-loader.lisp b/db-odbc/odbc-loader.lisp index eb04547..16f1ec1 100644 --- a/db-odbc/odbc-loader.lisp +++ b/db-odbc/odbc-loader.lisp @@ -7,8 +7,6 @@ ;;;; Programmers: Kevin M. Rosenberg ;;;; Date Started: April 2004 ;;;; -;;;; $Id$ -;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2004 by Kevin M. Rosenberg ;;;; ;;;; CLSQL users are granted the rights to distribute and use this software @@ -18,19 +16,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, @@ -41,10 +29,10 @@ set to the right path before compiling or loading the system.") (defmethod clsql-sys:database-type-library-loaded ((database-type (eql :odbc))) *odbc-library-loaded*) - + (defmethod clsql-sys:database-type-load-foreign ((database-type (eql :odbc))) - (uffi:load-foreign-library *odbc-library-path* - :module "odbc") + (clsql-uffi:find-and-load-foreign-library *odbc-library-filenames* + :module "odbc") (setq *odbc-library-loaded* t)) (clsql-sys:database-type-load-foreign :odbc)