I attach the following patch really to check that I've got the specifics of the documentation for swank:*communication-style* nil right. SBCL's win32 port is currently less featureful than its functionality on Unix-like operating systems, but the current developer CVS (sadly not yet its anoncvs) has enough socket support to deal with *communication-style* nil, so (after Tim Ritchey) I've hacked swank-sbcl into working there. I don't think I've changed the operation on any other sbcl platform, but it's always possible I've erred somewhere along the line.
Anyway, if people are happy with the documentation change I'll check this in later today.
Cheers,
Christophe
Index: ChangeLog =================================================================== RCS file: /project/slime/cvsroot/slime/ChangeLog,v retrieving revision 1.879 diff -u -r1.879 ChangeLog --- ChangeLog 1 Apr 2006 22:55:28 -0000 1.879 +++ ChangeLog 11 Apr 2006 23:25:19 -0000 @@ -1,3 +1,11 @@ +2006-04-12 Christophe Rhodes csr21@cam.ac.uk + + * swank-sbcl.lisp (various): compatibility fixes and band-aids for + the win32 port that will be released as sbcl 0.9.12. Should have + no impact on operation on any other platform. + + * doc/slime.texi: document the NIL communication-style. + 2006-04-01 Matthew D. Swank akopa@charter.net
* slime.el (slime-fontify-string): Use set-text-properties, not Index: swank-sbcl.lisp =================================================================== RCS file: /project/slime/cvsroot/slime/swank-sbcl.lisp,v retrieving revision 1.153 diff -u -r1.153 swank-sbcl.lisp --- swank-sbcl.lisp 22 Mar 2006 16:40:01 -0000 1.153 +++ swank-sbcl.lisp 11 Apr 2006 23:25:19 -0000 @@ -16,6 +16,7 @@ (eval-when (:compile-toplevel :load-toplevel :execute) (require 'sb-bsd-sockets) (require 'sb-introspect) + #-win32 (require 'sb-posix))
(declaim (optimize (debug 2))) @@ -32,11 +33,15 @@ ;;; TCP Server
(defimplementation preferred-communication-style () - (if (and (member :sb-thread *features*) - #+linux - (not (sb-alien:extern-alien "linux_no_threads_p" sb-alien:boolean))) - :spawn - :fd-handler)) + (cond + ;; to be improved when Win32 support for serve-event or threads is + ;; present. + ((member :win32 *features*) nil) + ((and (member :sb-thread *features*) + #+linux + (not (sb-alien:extern-alien "linux_no_threads_p" sb-alien:boolean))) + :spawn) + (t :fd-handler)))
(defun resolve-hostname (name) (car (sb-bsd-sockets:host-ent-addresses @@ -78,8 +83,12 @@ (sigio-handler signal code scp))))
(defun enable-sigio-on-fd (fd) - (sb-posix::fcntl fd sb-posix::f-setfl sb-posix::o-async) - (sb-posix::fcntl fd sb-posix::f-setown (getpid))) + #+win32 + (error "~S unsupported on this platform" 'enable-sigio-on-fd) + #-win32 + (progn + (sb-posix::fcntl fd sb-posix::f-setfl sb-posix::o-async) + (sb-posix::fcntl fd sb-posix::f-setown (getpid))))
(defimplementation add-sigio-handler (socket fn) (set-sigio-handler) @@ -139,6 +148,10 @@ (sb-sys:without-interrupts (funcall fn)))
(defimplementation getpid () + ;; FIXME + #+win32 + (sb-unix:unix-getpid) + #-win32 (sb-posix:getpid))
(defimplementation lisp-implementation-type-name () Index: doc/slime.texi =================================================================== RCS file: /project/slime/cvsroot/slime/doc/slime.texi,v retrieving revision 1.44 diff -u -r1.44 slime.texi --- doc/slime.texi 3 Mar 2006 15:03:31 -0000 1.44 +++ doc/slime.texi 11 Apr 2006 23:25:19 -0000 @@ -1415,6 +1415,11 @@ The available communication styles are:
@table @code +@item NIL +This style is the simplest of all: Lisp simply executes a loop, serving +@SLIME{} protocol requests. The simplicity means that the Lisp cannot do +any other processing while under @SLIME{}'s control. + @item :FD-HANDLER This style uses the classical Unix-style ``@code{select()}-loop.'' Swank registers the communication socket with an event-dispatching @@ -1446,8 +1451,8 @@
The default request handling style is chosen according to the capabilities your Lisp system. The general order of preference is -@code{:SPAWN}, then @code{:SIGIO}, then @code{:FD-HANDLER}. You can -check the default style by calling +@code{:SPAWN}, then @code{:SIGIO}, then @code{:FD-HANDLER}, with +@code{NIL} as a last resort. You can check the default style by calling @code{SWANK-BACKEND:PREFERRED-COMMUNICATION-STYLE}. You can also override the default by setting @code{SWANK:*COMMUNICATION-STYLE*} in your Swank init file.
Christophe Rhodes csr21@cam.ac.uk writes:
Anyway, if people are happy with the documentation change I'll check this in later today.
What with Nikodemus Siivola's work on SBCL, the patch to make SLIME work out of the box on (as-yet-unreleased) SBCL on Win32 is appended here. I'll check it in soon.
Cheers,
Christophe
? doc/contributors.texi ? doc/slime.aux ? doc/slime.cp ? doc/slime.dvi ? doc/slime.fn ? doc/slime.info ? doc/slime.ky ? doc/slime.log ? doc/slime.pdf ? doc/slime.pg ? doc/slime.ps ? doc/slime.toc ? doc/slime.tp ? doc/slime.vr Index: ChangeLog =================================================================== RCS file: /project/slime/cvsroot/slime/ChangeLog,v retrieving revision 1.884 diff -u -r1.884 ChangeLog --- ChangeLog 14 Apr 2006 16:07:10 -0000 1.884 +++ ChangeLog 16 Apr 2006 19:53:44 -0000 @@ -1,3 +1,10 @@ +2006-04-16 Christophe Rhodes csr21@cam.ac.uk + + * swank-sbcl.lisp (preferred-communication-style): Make it nil + under win32, for now. + + * doc/slime.texi: document nil *communication-style* + 2006-04-14 Gerd Flaig gefla@pond.sub.org
* slime.el (slime-autodoc): Fix reference to unbound variable. Index: swank-sbcl.lisp =================================================================== RCS file: /project/slime/cvsroot/slime/swank-sbcl.lisp,v retrieving revision 1.154 diff -u -r1.154 swank-sbcl.lisp --- swank-sbcl.lisp 12 Apr 2006 08:43:55 -0000 1.154 +++ swank-sbcl.lisp 16 Apr 2006 19:53:45 -0000 @@ -32,11 +32,15 @@ ;;; TCP Server
(defimplementation preferred-communication-style () - (if (and (member :sb-thread *features*) - #+linux - (not (sb-alien:extern-alien "linux_no_threads_p" sb-alien:boolean))) - :spawn - :fd-handler)) + (cond + ;; fixme: when SBCL/win32 gains better select() support, remove + ;; this. + ((member :win32 *features*) nil) + ((and (member :sb-thread *features*) + #+linux + (not (sb-alien:extern-alien "linux_no_threads_p" sb-alien:boolean))) + :spawn) + (t :fd-handler)))
(defun resolve-hostname (name) (car (sb-bsd-sockets:host-ent-addresses Index: doc/slime.texi =================================================================== RCS file: /project/slime/cvsroot/slime/doc/slime.texi,v retrieving revision 1.44 diff -u -r1.44 slime.texi --- doc/slime.texi 3 Mar 2006 15:03:31 -0000 1.44 +++ doc/slime.texi 16 Apr 2006 19:53:45 -0000 @@ -1415,6 +1415,12 @@ The available communication styles are:
@table @code +@item NIL +This style simply loops reading input from the communication socket +and serves @SLIME{} protocol events as they arise. The simplicity +means that the Lisp cannot do any other processing while under +@SLIME{}'s control. + @item :FD-HANDLER This style uses the classical Unix-style ``@code{select()}-loop.'' Swank registers the communication socket with an event-dispatching @@ -1446,11 +1452,11 @@
The default request handling style is chosen according to the capabilities your Lisp system. The general order of preference is -@code{:SPAWN}, then @code{:SIGIO}, then @code{:FD-HANDLER}. You can -check the default style by calling -@code{SWANK-BACKEND:PREFERRED-COMMUNICATION-STYLE}. You can also -override the default by setting @code{SWANK:*COMMUNICATION-STYLE*} in -your Swank init file. +@code{:SPAWN}, then @code{:SIGIO}, then @code{:FD-HANDLER}, with +@code{NIL} as a last resort. You can check the default style by +calling @code{SWANK-BACKEND:PREFERRED-COMMUNICATION-STYLE}. You can +also override the default by setting +@code{SWANK:*COMMUNICATION-STYLE*} in your Swank init file.
@node Other configurables, , Communication style, Lisp-side @subsection Other configurables