windows: fix sb-bsd-sockets build by adding shutdown() support
[sbcl.git] / contrib / sb-bsd-sockets / win32-constants.lisp
index 7b8e719..5b4ed07 100644 (file)
  (:integer msg-peek "MSG_PEEK")
  (:integer msg-dontroute "MSG_DONTROUTE")
 
+ ;; socket shutdown flags
+ (:integer SHUT_RD "SD_RECEIVE")
+ (:integer SHUT_WR "SD_SEND")
+ (:integer SHUT_RDWR "SD_BOTH")
 
+ ;; errors
  (:integer EADDRINUSE "WSAEADDRINUSE")
  (:integer EAGAIN "WSAEWOULDBLOCK")
  (:integer EBADF "WSAEBADF")
  (:function getprotobynumber ("getprotobynumber" (* protoent)
                                                  (proto int)))
 
+ ;; FIXME: We should probably grovel the windows SOCKET type and use it in
+ ;; these instead of int...
+
+ ;; KLUDGE: For historical reasons many of these prepend win32- to the symbol
+ ;; names. Life for Windows users of SBCL is already hard enough, so rather
+ ;; than break compatibility for those who directly use these, win32-sockets.lisp
+ ;; wraps them with prefixless wrappers.
  (:function win32-bind
             ("bind" int
              (sockfd int)
  (:function win32-close ("closesocket" int
                          (fd int)))
 
+ (:function shutdown ("shutdown" int
+                      (socket int) ; KLUDGE: should be SOCKET, not int.
+                      (how int)))
+
  (:function win32-recvfrom ("recvfrom" ssize-t
                             (socket int)
                             (buf (* t))