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.
