summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--atomicio.c16
2 files changed, 13 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index b0e4c46fa..b03e768ea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
120070921
2 - (djm) [atomicio.c] Fix spin avoidance for platforms that define
3 EWOULDBLOCK; patch from ben AT psc.edu
4
120070917 520070917
2 - (djm) OpenBSD CVS Sync 6 - (djm) OpenBSD CVS Sync
3 - djm@cvs.openbsd.org 2007/08/23 02:49:43 7 - djm@cvs.openbsd.org 2007/08/23 02:49:43
@@ -3258,4 +3262,4 @@
3258 OpenServer 6 and add osr5bigcrypt support so when someone migrates 3262 OpenServer 6 and add osr5bigcrypt support so when someone migrates
3259 passwords between UnixWare and OpenServer they will still work. OK dtucker@ 3263 passwords between UnixWare and OpenServer they will still work. OK dtucker@
3260 3264
3261$Id: ChangeLog,v 1.4757 2007/09/17 15:32:32 tim Exp $ 3265$Id: ChangeLog,v 1.4758 2007/09/21 03:12:49 djm Exp $
diff --git a/atomicio.c b/atomicio.c
index f32ff85ba..62ee40282 100644
--- a/atomicio.c
+++ b/atomicio.c
@@ -57,13 +57,13 @@ atomicio(ssize_t (*f) (int, void *, size_t), int fd, void *_s, size_t n)
57 res = (f) (fd, s + pos, n - pos); 57 res = (f) (fd, s + pos, n - pos);
58 switch (res) { 58 switch (res) {
59 case -1: 59 case -1:
60#ifdef EWOULDBLOCK
61 if (errno == EINTR || errno == EWOULDBLOCK)
62#else
63 if (errno == EINTR) 60 if (errno == EINTR)
64#endif
65 continue; 61 continue;
62#ifdef EWOULDBLOCK
63 if (errno == EAGAIN || errno == EWOULDBLOCK) {
64#else
66 if (errno == EAGAIN) { 65 if (errno == EAGAIN) {
66#endif
67 (void)poll(&pfd, 1, -1); 67 (void)poll(&pfd, 1, -1);
68 continue; 68 continue;
69 } 69 }
@@ -103,13 +103,13 @@ atomiciov(ssize_t (*f) (int, const struct iovec *, int), int fd,
103 res = (f) (fd, iov, iovcnt); 103 res = (f) (fd, iov, iovcnt);
104 switch (res) { 104 switch (res) {
105 case -1: 105 case -1:
106#ifdef EWOULDBLOCK
107 if (errno == EINTR || errno == EWOULDBLOCK)
108#else
109 if (errno == EINTR) 106 if (errno == EINTR)
110#endif
111 continue; 107 continue;
108#ifdef EWOULDBLOCK
109 if (errno == EAGAIN || errno == EWOULDBLOCK) {
110#else
112 if (errno == EAGAIN) { 111 if (errno == EAGAIN) {
112#endif
113 (void)poll(&pfd, 1, -1); 113 (void)poll(&pfd, 1, -1);
114 continue; 114 continue;
115 } 115 }