? defpackage.fasl ? large-object.fasl ? lowlevel.fasl ? md5.fasl ? meta-queries.fasl ? parsers.fasl ? pg.fasl ? sysdep.fasl ? utility.fasl ? v2-protocol.fasl ? v3-protocol.fasl Index: md5.lisp =================================================================== RCS file: /project/pg/cvsroot/pg/md5.lisp,v retrieving revision 1.2 diff -u -r1.2 md5.lisp --- md5.lisp 17 Jul 2005 15:44:48 -0000 1.2 +++ md5.lisp 11 Dec 2005 17:34:25 -0000 @@ -48,10 +48,6 @@ (in-package :PG-MD5) -#+sbcl -(eval-when (:load-toplevel :compile-toplevel) - (require :sb-rotate-byte)) - #+cmu (eval-when (:compile-toplevel) (defparameter *old-expansion-limit* ext:*inline-expansion-limit*) Index: pg.asd =================================================================== RCS file: /project/pg/cvsroot/pg/pg.asd,v retrieving revision 1.8 diff -u -r1.8 pg.asd --- pg.asd 18 Oct 2005 13:07:27 -0000 1.8 +++ pg.asd 11 Dec 2005 17:34:25 -0000 @@ -21,6 +21,7 @@ #+lispworks "comm" #+cormanlisp :sockets #+sbcl :sb-bsd-sockets + #+sbcl :sb-rotate-byte #+(and mcl (not openmcl)) "OPENTRANSPORT") :components ((:file "md5") (:file "defpackage" :depends-on ("md5")) Index: sysdep.lisp =================================================================== RCS file: /project/pg/cvsroot/pg/sysdep.lisp,v retrieving revision 1.10 diff -u -r1.10 sysdep.lisp --- sysdep.lisp 18 Oct 2005 13:07:27 -0000 1.10 +++ sysdep.lisp 11 Dec 2005 17:34:25 -0000 @@ -1,7 +1,7 @@ ;;; sysdep.lisp -- system-dependent parts of pg-dot-lisp ;;; ;;; Author: Eric Marsden -;;; Time-stamp: <2005-07-17 emarsden> +;;; Time-stamp: <2005-10-24 10:11:55 asf> ;; ;; @@ -141,27 +141,30 @@ :transport-error e)))) #+sbcl -(defun socket-connect (port host) +(defun socket-connect (port host-name) (declare (type integer port)) - (handler-case - (sb-bsd-sockets:socket-make-stream - (if host - (let ((s (make-instance 'sb-bsd-sockets:inet-socket - :type :stream :protocol :tcp)) - (num (car (sb-bsd-sockets:host-ent-addresses - (sb-bsd-sockets:get-host-by-name host))))) - (sb-bsd-sockets:socket-connect s num port) - s) - (let ((s (make-instance 'sb-bsd-sockets:local-socket :type :stream))) - (sb-bsd-sockets:socket-connect - s (format nil "/var/run/postgresql/.s.PGSQL.~D" port)) - s)) - :element-type '(unsigned-byte 8) - :input t - :output t - :buffering :none) - (error (e) - (error 'connection-failure :host host :port port :transport-error e)))) + (let ((host (if (typep host-name 'pathname) + (namestring host-name) + host-name))) + (handler-case + (sb-bsd-sockets:socket-make-stream + (if (eql #\/ (char host 0)) + (let ((s (make-instance 'sb-bsd-sockets:local-socket :type :stream))) + (sb-bsd-sockets:socket-connect + s (format nil "~A.s.PGSQL.~D" (string host) port)) + s) + (let ((s (make-instance 'sb-bsd-sockets:inet-socket + :type :stream :protocol :tcp)) + (num (car (sb-bsd-sockets:host-ent-addresses + (sb-bsd-sockets:get-host-by-name host))))) + (sb-bsd-sockets:socket-connect s num port) + s)) + :element-type '(unsigned-byte 8) + :input t + :output t + :buffering :none) + (error (e) + (error 'connection-failure :host host :port port :transport-error e))))) #+allegro (defun socket-connect (port host)