X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=db-sqlite%2Fsqlite-loader.lisp;h=ac77fafa4946e282aa53206895c3d2a2c550fa21;hp=aa25d5e44d835b34cb5207eb13a0f2bf947acbdf;hb=d2d49ab13c98bc7a1819a0fd3968268a5567bdc3;hpb=96f11bcf17e429fca93f990a79d07a2b1d24a1df diff --git a/db-sqlite/sqlite-loader.lisp b/db-sqlite/sqlite-loader.lisp index aa25d5e..ac77faf 100644 --- a/db-sqlite/sqlite-loader.lisp +++ b/db-sqlite/sqlite-loader.lisp @@ -7,8 +7,6 @@ ;;;; Programmer: Aurelio Bignoli ;;;; Date Started: Nov 2003 ;;;; -;;;; $Id$ -;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2003 by Aurelio Bignoli ;;;; ;;;; CLSQL users are granted the rights to distribute and use this software @@ -23,31 +21,20 @@ to load the SQLite library succesfully. If this differs at your site, set to the right path before compiling or loading the system.") -(defvar *sqlite-library-loaded* #+clisp t - #-clisp nil - "T if foreign library was able to be loaded successfully") +(defvar *sqlite-library-loaded* nil + "T if foreign library was able to be loaded successfully") (defmethod database-type-library-loaded ((database-type (eql :sqlite))) "T if foreign library was able to be loaded successfully. " *sqlite-library-loaded*) (defmethod database-type-load-foreign ((database-type (eql :sqlite))) - #+clisp - t - #-clisp - (let ((libpath (uffi:find-foreign-library - '("libsqlite" "sqlite") - '(#+64bit "/usr/lib64/" - "/usr/lib/" "/usr/local/lib/" "/bin/") - :drive-letters '("C" "D" "E")))) - (if (uffi:load-foreign-library libpath - :module "sqlite" - :supporting-libraries - *sqlite-supporting-libraries*) - (setq *sqlite-library-loaded* t) - (warn "Can't load SQLite library ~A" libpath)))) + (clsql-uffi:find-and-load-foreign-library '("libsqlite" "sqlite") + :module "sqlite" + :supporting-libraries *sqlite-supporting-libraries*) + (setq *sqlite-library-loaded* t)) (clsql-sys:database-type-load-foreign :sqlite) - +