X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=interfaces%2Fpostgresql-socket%2Fpostgresql-socket-api.cl;h=9eae607266d5b51217148182b81fca2b8986e8a2;hb=ffa5430147dcb058ecce8a0ece026e0daf9a6605;hp=0c64353403fe7912a1378fc567c1d80a20dd91a9;hpb=ed0ba77f1cff4820da69c6229018e06b9efad1b5;p=clsql.git diff --git a/interfaces/postgresql-socket/postgresql-socket-api.cl b/interfaces/postgresql-socket/postgresql-socket-api.cl index 0c64353..9eae607 100644 --- a/interfaces/postgresql-socket/postgresql-socket-api.cl +++ b/interfaces/postgresql-socket/postgresql-socket-api.cl @@ -9,7 +9,7 @@ ;;;; ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: postgresql-socket-api.cl,v 1.11 2002/03/27 11:13:27 kevin Exp $ +;;;; $Id: postgresql-socket-api.cl,v 1.13 2002/04/06 23:23:47 kevin Exp $ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; and Copyright (c) 1999-2001 by Pierre R. Mai @@ -219,19 +219,18 @@ socket interface" ;;; Support for encrypted password transmission -(defconstant +crypt-library+ "/usr/lib/libcrypt.so" - "Name of the shared library to load in order to access the crypt -function named by `*crypt-function-name*'.") - (defvar *crypt-library-loaded* nil) (defun crypt-password (password salt) "Encrypt a password for transmission to a PostgreSQL server." (unless *crypt-library-loaded* - (uffi:load-foreign-library +crypt-library+ :supporting-libaries '("c")) - (eval (uffi:def-function "crypt" - ((key :cstring) - (salt :cstring)) + (uffi:load-foreign-library + (find-foreign-library "libcrypt" + '("/usr/lib/" "/usr/local/lib/" "/lib/")) + :supporting-libaries '("c")) + (eval '(uffi:def-function "crypt" + ((key :cstring) + (salt :cstring)) :returning :cstring)) (setq *crypt-library-loaded* t)) (uffi:with-cstring (password-cstring password) @@ -569,7 +568,7 @@ connection, if it is still open." (defun read-field (socket type) (let ((length (- (read-socket-value 'int32 socket) 4))) (case type - ((:int :long :longlong) + ((:int32 :int64) (read-integer-from-socket socket length)) (:double (read-double-from-socket socket length))