Index: /trunk/ccl/level-1/l1-events.lisp
===================================================================
--- /trunk/ccl/level-1/l1-events.lisp	(revision 5048)
+++ /trunk/ccl/level-1/l1-events.lisp	(revision 5049)
@@ -182,16 +182,15 @@
   (with-lock-grabbed (*auto-flush-streams-lock*)
     (dolist (s *auto-flush-streams*)
-      (when (and (open-stream-p s)
-                 (ioblock-outbuf-lock (stream-ioblock s t)))
-	(maybe-stream-force-output s)))))
+      (when (open-stream-p s)
+        (if (or (typep s 'basic-stream)
+                (typep s 'buffered-io-stream-mixin))
+          (if (ioblock-outbuf-lock (stream-ioblock s t))
+            (maybe-stream-force-output s)))
+        (force-output s)))))
 
 (defun add-auto-flush-stream (s)
   (with-lock-grabbed (*auto-flush-streams-lock*)
-    (unless (member s *auto-flush-streams*)
-      (let* ((ioblock (stream-ioblock s t)))
-        (unless (ioblock-outbuf-lock ioblock)
-          (setf (ioblock-outbuf-lock ioblock) (make-lock)
-                (ioblock-owner ioblock) nil)))
-      (push s *auto-flush-streams*))))
+    (when (typep s 'output-stream)
+      (pushnew s *auto-flush-streams*))))
       
 (defun remove-auto-flush-stream (s)
