From e898391728b43b0bb02938e98a4df08f5a76ac04 Mon Sep 17 00:00:00 2001 From: djm Date: Fri, 4 Jul 2008 23:36:58 +0000 Subject: [PATCH] - (djm) [atomicio.c configure.ac] Disable poll() fallback in atomiciov for Tru64. readv doesn't seem to be a comparable object there. bz#1386, patch from dtucker@ ok me --- ChangeLog | 3 +++ atomicio.c | 4 ++++ configure.ac | 1 + 3 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index d57808f3..0db459f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,9 @@ - (djm) [auth.c] Fixed test for locked account on HP/UX with shadowed passwords disabled. bz#1083 report & patch from senthilkumar_sen AT hotpop.com, w/ dtucker@ + - (djm) [atomicio.c configure.ac] Disable poll() fallback in atomiciov for + Tru64. readv doesn't seem to be a comparable object there. + bz#1386, patch from dtucker@ ok me 20080704 - (dtucker) OpenBSD CVS Sync diff --git a/atomicio.c b/atomicio.c index bb44c323..a6b2d127 100644 --- a/atomicio.c +++ b/atomicio.c @@ -97,8 +97,10 @@ atomiciov(ssize_t (*f) (int, const struct iovec *, int), int fd, /* Make a copy of the iov array because we may modify it below */ memcpy(iov, _iov, iovcnt * sizeof(*_iov)); +#ifndef BROKEN_READV_COMPARISON pfd.fd = fd; pfd.events = f == readv ? POLLIN : POLLOUT; +#endif for (; iovcnt > 0 && iov[0].iov_len > 0;) { res = (f) (fd, iov, iovcnt); switch (res) { @@ -106,7 +108,9 @@ atomiciov(ssize_t (*f) (int, const struct iovec *, int), int fd, if (errno == EINTR) continue; if (errno == EAGAIN || errno == EWOULDBLOCK) { +#ifndef BROKEN_READV_COMPARISON (void)poll(&pfd, 1, -1); +#endif continue; } return 0; diff --git a/configure.ac b/configure.ac index 2e8d270d..a970e02a 100644 --- a/configure.ac +++ b/configure.ac @@ -841,6 +841,7 @@ mips-sony-bsd|mips-sony-newsos4) AC_DEFINE(SETEUID_BREAKS_SETUID) AC_DEFINE(BROKEN_SETREUID) AC_DEFINE(BROKEN_SETREGID) + AC_DEFINE(BROKEN_READV_COMPARISON, 1, [Can't do comparisons on readv])) ;; *-*-nto-qnx*) -- 2.45.2