anchor.diff:    (defconstant fionread 1074030207)
   
     (sb-alien:define-alien-type ws-socket sb-alien:unsigned-int)
  +  (sb-alien:define-alien-type ws-dword sb-alien:unsigned-long)
  +  (sb-alien:define-alien-type ws-event sb-alien::hinstance)
   
     (sb-alien:define-alien-type nil
       (sb-alien:struct wsa-network-events
  
positive.code: #+ecl
  (eval-when (:compile-toplevel :load-toplevel :execute)
    (require :sockets))
  
  #+(and sbcl win32) ; for "WaitForSingleObject"
  (eval-when (:compile-toplevel :load-toplevel :execute)
    (sb-alien:load-shared-object "kernel32.dll"))
  
  #+sbcl
  (progn
  
negative.code: 
    (defun wait-for-input-internal (wait-list &key timeout)
      (when (waiting-required (wait-list-waiters wait-list))
        (let ((rv (wsa-wait-for-multiple-events 1 (wait-list-%wait wait-list)
                                                nil (truncate (* 1000 timeout)) nil)))
          (ecase rv
            ((#.+wsa-wait-event-0+ #.+wsa-wait-timeout+)
             (update-ready-and-state-slots (wait-list-waiters wait-list)))
            ((#.+wsa-wait-failed+)
             (raise-usock-err
              (sb-win32::get-last-error-message (sb-win32::get-last-error))
              wait-list))))))
  