X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=db-postgresql%2Fpostgresql-loader.lisp;h=8124bb924029cedc4f59e236fc0e367dd5b0dbfe;hb=0e43efc5b776edd86d304e103123944a84efd9a4;hp=169588f742e02fabb4d4992a66a051e8296aa3f3;hpb=b746611f6d622273f1563d9d0f65b59b58714694;p=clsql.git diff --git a/db-postgresql/postgresql-loader.lisp b/db-postgresql/postgresql-loader.lisp index 169588f..8124bb9 100644 --- a/db-postgresql/postgresql-loader.lisp +++ b/db-postgresql/postgresql-loader.lisp @@ -27,29 +27,16 @@ set to the right path before compiling or loading the system.") (defvar *postgresql-library-loaded* nil "T if foreign library was able to be loaded successfully") -(defmethod clsql-base:database-type-library-loaded ((database-type +(defmethod clsql-sys:database-type-library-loaded ((database-type (eql :postgresql))) *postgresql-library-loaded*) -(defmethod clsql-base:database-type-load-foreign ((database-type +(defmethod clsql-sys:database-type-load-foreign ((database-type (eql :postgresql))) - (let ((libpath (uffi:find-foreign-library - "libpq" - '("/opt/postgresql/lib/" "/usr/local/lib/" - #+64bit "/usr/lib64/" - "/usr/lib/" "/postgresql/lib/" - "/usr/local/pgsql/lib/" "/usr/lib/pgsql/" - "/opt/pgsql/lib/pgsql" "/sw/lib/pgsql/") - :drive-letters '("C" "D" "E") - #+(or macosx darwin ccl-5.0) :types - #+(or macosx darwin ccl-5.0) '("so") - ))) - (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-uffi:find-and-load-foreign-library "libpq" + :module "postgresql" + :supporting-libraries *postgresql-supporting-libraries*) + (setq *postgresql-library-loaded* t)) -(clsql-base:database-type-load-foreign :postgresql) +(clsql-sys:database-type-load-foreign :postgresql)