projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
1.0.8.8: restore reuse-sap value after incomplete writes in FROB-OUTPUT-LATER
[sbcl.git]
/
contrib
/
sb-bsd-sockets
/
sockets.lisp
diff --git
a/contrib/sb-bsd-sockets/sockets.lisp
b/contrib/sb-bsd-sockets/sockets.lisp
index
829829a
..
e9fa645
100644
(file)
--- a/
contrib/sb-bsd-sockets/sockets.lisp
+++ b/
contrib/sb-bsd-sockets/sockets.lisp
@@
-5,10
+5,6
@@
(eval-when (:load-toplevel :compile-toplevel :execute)
(eval-when (:load-toplevel :compile-toplevel :execute)
-#+win32
-(defvar *wsa-startup-call*
- (sockint::wsa-startup (sockint::make-wsa-version 2 2)))
-
(defclass socket ()
((file-descriptor :initarg :descriptor
:reader socket-file-descriptor)
(defclass socket ()
((file-descriptor :initarg :descriptor
:reader socket-file-descriptor)
@@
-24,7
+20,7
@@
protocol. Other values are used as-is.")
:reader socket-type
:documentation "Type of the socket: :STREAM or :DATAGRAM.")
(stream))
:reader socket-type
:documentation "Type of the socket: :STREAM or :DATAGRAM.")
(stream))
- (:documentation "Common base class of all sockets, not ment to be
+ (:documentation "Common base class of all sockets, not meant to be
directly instantiated.")))
(defmethod print-object ((object socket) stream)
directly instantiated.")))
(defmethod print-object ((object socket) stream)
@@
-100,7
+96,9
@@
values"))
sockaddr
(size-of-sockaddr socket))))
(cond
sockaddr
(size-of-sockaddr socket))))
(cond
- ((and (= fd -1) (= sockint::EAGAIN (sb-unix::get-errno)))
+ ((and (= fd -1)
+ (member (sb-unix::get-errno)
+ (list sockint::EAGAIN sockint::EINTR)))
nil)
((= fd -1) (socket-error "accept"))
(t (apply #'values
nil)
((= fd -1) (socket-error "accept"))
(t (apply #'values
@@
-204,7
+202,10
@@
small"))
sockaddr
(sb-alien:addr sa-len))))
(cond
sockaddr
(sb-alien:addr sa-len))))
(cond
- ((and (= len -1) (= sockint::EAGAIN (sb-unix::get-errno))) nil)
+ ((and (= len -1)
+ (member (sb-unix::get-errno)
+ (list sockint::EAGAIN sockint::EINTR)))
+ nil)
((= len -1) (socket-error "recvfrom"))
(t (loop for i from 0 below len
do (setf (elt buffer i)
((= len -1) (socket-error "recvfrom"))
(t (loop for i from 0 below len
do (setf (elt buffer i)
@@
-280,7
+281,7
@@
send(2) will be called instead. Returns the number of octets written."))
(cond
((and (= len -1)
(member (sb-unix::get-errno)
(cond
((and (= len -1)
(member (sb-unix::get-errno)
- '(sockint::EAGAIN sockint::EINTR)))
+ (list sockint::EAGAIN sockint::EINTR)))
nil)
((= len -1)
(socket-error "sendto"))
nil)
((= len -1)
(socket-error "sendto"))
@@
-355,7
+356,7
@@
SB-SYS:MAKE-FD-STREAM."))
(unless stream
(setf stream (apply #'sb-sys:make-fd-stream
(socket-file-descriptor socket)
(unless stream
(setf stream (apply #'sb-sys:make-fd-stream
(socket-file-descriptor socket)
- :name "a constant string"
+ :name "a socket"
:dual-channel-p t
args))
(setf (slot-value socket 'stream) stream)
:dual-channel-p t
args))
(setf (slot-value socket 'stream) stream)