[hunchentoot-devel] Small patch for LispWorks 6 beta

Nico de Jager ndj at bitart.cc
Thu Oct 1 18:49:29 UTC 2009


Hi Edi & Hans!

Hans Hübner <hans.huebner at gmail.com> writes:

> The patch does not look as if it worked for the Lispworks 4 case.

No, it is meant to work for LispWorks 4.x as well, see below.


> Is LW 4 still in use?  It might be sensible to remove support for it
> instead, but that'd be basically Edi's call.
>
> -Hans
>
> On Wed, Sep 30, 2009 at 10:24, Nico de Jager <ndj at bitart.cc> wrote:
>> $ diff -u lispworks.lisp_orig lispworks.lisp_patched
>> --- lispworks.lisp_orig 2009-09-30 11:42:22.000000000 +0200
>> +++ lispworks.lisp_patched      2009-09-30 19:06:22.118317238 +0200
>> @@ -90,14 +90,14 @@
>>  (defun make-socket-stream (socket acceptor)
>>   "Returns a stream for the socket SOCKET.  The ACCEPTOR argument is
>>  used to set the timeouts."
>> -  #-:lispworks5
>> +  #+:lispworks4
>>   (when (acceptor-write-timeout acceptor)
>>     (parameter-error "You need LispWorks 5 or higher for write timeouts."))
>>   (make-instance 'comm:socket-stream
>>                  :socket socket
>>                  :direction :io
>>                  :read-timeout (acceptor-read-timeout acceptor)
>> -                 #+:lispworks5 #+:lispworks5
>> +                 #-:lispworks4
>>                  :write-timeout (acceptor-write-timeout acceptor)
>>                  :element-type 'octet))

Edi Weitz <edi at agharta.de> writes:

> On Thu, Oct 1, 2009 at 1:04 AM, Hans Hübner <hans.huebner at gmail.com> wrote:
>> The patch does not look as if it worked for the Lispworks 4 case.
>
> LW4 didn't have write timeouts (and, yes, I think some people still
> use it).

Yes.


> I guess Nico wanted to have #- instead of #+ in there,

No, it is as intended. Please correct me if I am having a brain fart.


> but I think it's safer, although a bit more clumsy, to specifically
> mention LW5 and LW6 (which, as we know from the ECLM, will be released
> soon).

The first patch I sent to Edi privately, was as the one at the
bottom. But isn't 

#+:lispworks4  ==  #-(or :lispworks5 :lispworks6)
and
#-:lispworks4  ==  #+(or :lispworks5 :lispworks6)

when we are only considering version 4, 5 and 6? In fact, the patch at
the top is better, since when LispWorks 7.x comes out the patch above
will already work as it covers versions 4 and higher, but the patch
below will have to be amended, since it only covers version 4, 5 and
6. Which one is clearer, is subjective - I like the one at the top
because the exceptions is specifically for LispWorks4 and for the reason
described in the previous sentence.

B.t.w. the double #+:lispworks5 #+:lispworks5 in the original code is a
(harmless) mistake, correct?

Regards.
Nico

$ diff -u lispworks.lisp_orig lispworks.lisp_patched2
--- lispworks.lisp_orig 2009-09-30 11:42:22.000000000 +0200
+++ lispworks.lisp_patched2     2009-10-01 18:58:19.102193637 +0200
@@ -90,14 +90,14 @@
 (defun make-socket-stream (socket acceptor)
   "Returns a stream for the socket SOCKET.  The ACCEPTOR argument is
 used to set the timeouts."
-  #-:lispworks5
+  #-(or :lispworks5 :lispworks6)
   (when (acceptor-write-timeout acceptor)
     (parameter-error "You need LispWorks 5 or higher for write timeouts."))
   (make-instance 'comm:socket-stream
                  :socket socket
                  :direction :io
                  :read-timeout (acceptor-read-timeout acceptor)
-                 #+:lispworks5 #+:lispworks5
+                 #+(or :lispworks5 :lispworks6)
                  :write-timeout (acceptor-write-timeout acceptor)
                  :element-type 'octet))





More information about the Tbnl-devel mailing list