[cl-debian] Bug#320237: acknowledged by developer (Bug#320237: fixed in cl-port 20050624-2)

Magnus Henoch mange at freemail.hu
Tue Aug 9 19:43:41 UTC 2005


It doesn't compile with sbcl for me.  The following patch fixes that,
and makes my test case run.  Server sockets still don't work,
though...

diff -c -L /sshx:ktisis:/tmp/port/net.lisp~ -L /sshx:ktisis:/tmp/port/net.lisp /tmp/tramp.798Djp /tmp/tramp.798Qtv
--- /sshx:ktisis:/tmp/port/net.lisp~
+++ /sshx:ktisis:/tmp/port/net.lisp
@@ -45,7 +45,7 @@
   #+allegro (socket:ipaddr-to-dotted ipaddr)
   #+openmcl (ccl:ipaddr-to-dotted ipaddr)
   #+(and sbcl net.sbcl.sockets) (net.sbcl.sockets:ipaddr-to-dot-string ipaddr)
-  #-(or allegro openmcl sbcl)
+  #-(or allegro openmcl (and sbcl net.sbcl.sockets))
   (format nil "~d.~d.~d.~d"
           (logand #xff (ash ipaddr -24)) (logand #xff (ash ipaddr -16))
           (logand #xff (ash ipaddr -8)) (logand #xff ipaddr)))
@@ -58,7 +58,7 @@
   #+allegro (socket:dotted-to-ipaddr dotted)
   #+openmcl (ccl:dotted-to-ipaddr dotted)
   #+(and sbcl net.sbcl.sockets) (net.sbcl.sockets:dot-string-to-ipaddr dotted)
-  #-(or allegro openmcl sbcl)
+  #-(or allegro openmcl (and sbcl net.sbcl.sockets))
   (let ((ll (string-tokens (substitute #\Space #\. dotted))))
     (+ (ash (first ll) 24) (ash (second ll) 16)
        (ash (third ll) 8) (fourth ll))))
@@ -202,8 +202,9 @@
   #+gcl 'stream
   #+lispworks 'comm:socket-stream
   #+openmcl 'ccl::socket
-  #+(or (and sbcl (not (or db-sockets net.sbcl.sockets))) (and sbcl db-sockets)) 'sb-sys:fd-stream
+  #+(and sbcl db-sockets) 'sb-sys:fd-stream
   #+(and sbcl net.sbcl.sockets) 'net.sbcl.sockets:stream-socket
+  #+(and sbcl (not (or db-sockets net.sbcl.sockets))) 'sb-bsd-sockets:socket
   #-(or abcl allegro clisp cmu gcl lispworks openmcl
 	sbcl scl) 'stream)
 
@@ -305,13 +306,12 @@
           (ccl:ipaddr-to-dotted (ccl:local-host sock))
           (ccl:local-port sock))
   #+(and sbcl (not (or db-sockets net.sbcl.sockets)))
-  (let ((sock (sb-sys:fd-stream-fd sock)))
-    (multiple-value-bind (remote remote-port) (sb-bsd-sockets:socket-peername sock)
-      (multiple-value-bind (local local-port) (sb-bsd-sockets:socket-name sock)
-        (values (ipaddr-to-dotted (vector-to-ipaddr remote))
-                remote-port
-                (ipaddr-to-dotted (vector-to-ipaddr local))
-                local-port))))
+  (multiple-value-bind (remote remote-port) (sb-bsd-sockets:socket-peername sock)
+    (multiple-value-bind (local local-port) (sb-bsd-sockets:socket-name sock)
+      (values (ipaddr-to-dotted (vector-to-ipaddr remote))
+	      remote-port
+	      (ipaddr-to-dotted (vector-to-ipaddr local))
+	      local-port)))
   #+(and sbcl db-sockets)
   (let ((sock (sb-sys:fd-stream-fd sock)))
     (multiple-value-bind (remote remote-port) (sockets:socket-peername sock)
@@ -323,7 +323,7 @@
   #+(and sbcl net.sbcl.sockets)
   (net.sbcl.sockets:socket-host-port sock)
   #-(or allegro clisp cmu gcl lispworks mcl
-        (and sbcl (or net.sbcl.sockets db-sockets)) scl)
+        sbcl scl)
   (error 'not-implemented :proc (list 'socket-host/port sock)))
 
 (defun socket-string (sock)
@@ -348,8 +348,9 @@
   #+(or cmu scl) 'integer
   #+gcl 'si:socket-stream
   #+mcl 'ccl::listener-socket
-  #+(or (and sbcl (not (or db-sockets net.sbcl.sockets))) (and sbcl db-sockets)) 'sb-sys:fd-stream
+  #+(and sbcl db-sockets) 'sb-sys:fd-stream
   #+(and sbcl net.sbcl.sockets) 'net.sbcl.sockets:passive-socket
+  #+(and sbcl (not (or db-sockets net.sbcl.sockets))) 'sb-bsd-sockets:socket
   #-(or abcl allegro clisp cmu gcl mcl
         sbcl scl) t)
 
@@ -376,7 +377,8 @@
   #+(and sbcl (not (or db-sockets net.sbcl.sockets)))
   (let ((socket (make-instance 'sb-bsd-sockets:inet-socket
                                :type :stream :protocol :tcp)))
-    (sb-bsd-sockets:socket-bind socket (vector 0 0 0 0) (or port 0)))
+    (sb-bsd-sockets:socket-bind socket (vector 0 0 0 0) (or port 0))
+    socket)
   #+(and sbcl db-sockets)
   (let ((socket (make-instance 'sockets:inet-socket
                                :type :stream :protocol :tcp)))
@@ -498,7 +500,7 @@
   #+openmcl
   (values (ccl:ipaddr-to-dotted (ccl:local-host server))
           (ccl:local-port server))
-  #+(and sbcl db-sockets)
+  #+(and sbcl (not (or db-sockets net.sbcl.sockets)))
   (multiple-value-bind (addr port) (sb-bsd-sockets:socket-name server)
     (values (vector-to-ipaddr addr) port))
   #+(and sbcl db-sockets)

Diff finished.  Tue Aug  9 21:31:43 2005





More information about the Cl-debian mailing list