X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=interfaces%2Fpostgresql%2Fpostgresql-loader.cl;h=dd862617f3fa03534e8412ab2582bbeb02d35734;hb=a1d4df09eabc40b260a35cc8d1e9288204121cfa;hp=2a420f6ad93ed66cb97f1e547396004af279a87d;hpb=b3d8cca2287bb8e5224798a549cc9069abc7d968;p=clsql.git diff --git a/interfaces/postgresql/postgresql-loader.cl b/interfaces/postgresql/postgresql-loader.cl index 2a420f6..dd86261 100644 --- a/interfaces/postgresql/postgresql-loader.cl +++ b/interfaces/postgresql/postgresql-loader.cl @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: postgresql-loader.cl,v 1.8 2002/05/14 16:29:53 kevin Exp $ +;;;; $Id: postgresql-loader.cl,v 1.10 2002/05/15 16:57:31 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -34,19 +34,20 @@ set to the right path before compiling or loading the system.") (defmethod clsql-sys:database-type-load-foreign ((database-type (eql :postgresql))) - (when - (uffi:load-foreign-library - (uffi:find-foreign-library "libpq" - '("/opt/postgresql/lib/" "/usr/local/lib/" - "/usr/lib/" "/postgresql/lib/" - "/usr/local/pgsql/lib/" "/usr/lib/pgsql/" - "/opt/pgsql/lib/pgsql") - :drive-letters '("C" "D" "E")) - - :module "postgresql" - :supporting-libraries - *postgresql-supporting-libraries*) - (setq *postgresql-library-loaded* t))) + (let ((libpath (uffi:find-foreign-library + "libpq" + '("/opt/postgresql/lib/" "/usr/local/lib/" + "/usr/lib/" "/postgresql/lib/" + "/usr/local/pgsql/lib/" "/usr/lib/pgsql/" + "/opt/pgsql/lib/pgsql") + :drive-letters '("C" "D" "E") + :types '("so" "so.2" "dll")))) + (if (uffi:load-foreign-library libpath + :module "postgresql" + :supporting-libraries + *postgresql-supporting-libraries*) + (setq *postgresql-library-loaded* t) + (warn "Can't load PostgreSQL client library ~A" libpath)))) (clsql-sys:database-type-load-foreign :postgresql)