Edi Weitz edi@agharta.de writes:
On Thu, Oct 1, 2009 at 8:49 PM, Nico de Jager ndj@bitart.cc wrote:
No, it is as intended. Please correct me if I am having a brain fart.
My bad. I didn't look closely enough.
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.
What I don't like about this is that it doesn't take LW3 into account... :)
Only half joking, really. Starting with LW4 seems a rather arbitrary assumption to me although the code very likely won't work with LW3 anyway, but the code isn't self-documenting anymore. #-:lispworks4 says "for all except LW4" while you actually wanted to say "for LW5 and LW6 and maybe LW7 as well".
But..., hmm..., ok. :-)
B.t.w. the double #+:lispworks5 #+:lispworks5 in the original code is a (harmless) mistake, correct?
No, it's on purpose. It affects the /two/ forms following it and your patch must also take care of two forms.
I see - thanks Edi. Back to the CLHS then...
Below, is another attempt.
Regards. Nico
$ diff -u lispworks.lisp lispworks.lisp_patched3 --- lispworks.lisp 2009-02-17 00:14:24.000000000 +0200 +++ lispworks.lisp_patched3 2009-10-02 20:03:58.986727798 +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) #+(or :lispworks5 :lispworks6) :write-timeout (acceptor-write-timeout acceptor) :element-type 'octet))