Changeset 14803 for trunk/source/level-1


Ignore:
Timestamp:
May 18, 2011, 9:13:31 AM (8 years ago)
Author:
gb
Message:

Many Winsock functions return unsigned 32-bit values, where #xfffffffff
is used to indicate error. Account for that in CHECK-WINSOCK-ERROR.
(Should double-check that 32-bit values are used on Win64)

Error returns from CHECK-WINSOCK-ERROR will be negative; make sure that
SOCKET-ACCEPT knows that.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-1/l1-sockets.lisp

    r14514 r14803  
    5757    (let* ((val (gensym)))
    5858      `(let* ((,val ,form))
    59         (if (< ,val 0)
     59        (if (or (< ,val 0) (eql ,val #xffffffff))
    6060          (%get-winsock-error)
    6161          ,val))))
     
    876876             (if (and async (< res 0)
    877877                      #+windows-target
    878                       (= res #$WSAEWOULDBLOCK)
     878                      (= res (- #$WSAEWOULDBLOCK))
    879879                      #-windows-target
    880880                      (or (eql res (- #$ENETDOWN))
Note: See TracChangeset for help on using the changeset viewer.