diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | atomicio.c | 4 | ||||
-rw-r--r-- | configure.ac | 6 |
3 files changed, 12 insertions, 2 deletions
@@ -2,6 +2,10 @@ | |||
2 | - (djm) [configure.ac] Only check for width-specified integer types | 2 | - (djm) [configure.ac] Only check for width-specified integer types |
3 | in headers that actually exist. patch from Tom G. Christensen; | 3 | in headers that actually exist. patch from Tom G. Christensen; |
4 | ok dtucker@ | 4 | ok dtucker@ |
5 | - (djm) [configure.ac atomicio.c] Kludge around NetBSD offering | ||
6 | different symbols for 'read' when various compiler flags are | ||
7 | in use, causing atomicio.c comparisons against it to break and | ||
8 | read/write operations to hang; ok dtucker | ||
5 | 9 | ||
6 | 20140129 | 10 | 20140129 |
7 | - (djm) [configure.ac] Fix broken shell test '==' vs '='; patch from | 11 | - (djm) [configure.ac] Fix broken shell test '==' vs '='; patch from |
diff --git a/atomicio.c b/atomicio.c index 601b3c371..2bac36c91 100644 --- a/atomicio.c +++ b/atomicio.c | |||
@@ -56,8 +56,10 @@ atomicio6(ssize_t (*f) (int, void *, size_t), int fd, void *_s, size_t n, | |||
56 | ssize_t res; | 56 | ssize_t res; |
57 | struct pollfd pfd; | 57 | struct pollfd pfd; |
58 | 58 | ||
59 | #ifndef BROKEN_READ_COMPARISON | ||
59 | pfd.fd = fd; | 60 | pfd.fd = fd; |
60 | pfd.events = f == read ? POLLIN : POLLOUT; | 61 | pfd.events = f == read ? POLLIN : POLLOUT; |
62 | #endif | ||
61 | while (n > pos) { | 63 | while (n > pos) { |
62 | res = (f) (fd, s + pos, n - pos); | 64 | res = (f) (fd, s + pos, n - pos); |
63 | switch (res) { | 65 | switch (res) { |
@@ -65,7 +67,9 @@ atomicio6(ssize_t (*f) (int, void *, size_t), int fd, void *_s, size_t n, | |||
65 | if (errno == EINTR) | 67 | if (errno == EINTR) |
66 | continue; | 68 | continue; |
67 | if (errno == EAGAIN || errno == EWOULDBLOCK) { | 69 | if (errno == EAGAIN || errno == EWOULDBLOCK) { |
70 | #ifndef BROKEN_READ_COMPARISON | ||
68 | (void)poll(&pfd, 1, -1); | 71 | (void)poll(&pfd, 1, -1); |
72 | #endif | ||
69 | continue; | 73 | continue; |
70 | } | 74 | } |
71 | return 0; | 75 | return 0; |
diff --git a/configure.ac b/configure.ac index 571362163..dfd32cd85 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,4 +1,4 @@ | |||
1 | # $Id: configure.ac,v 1.567 2014/01/29 23:21:20 djm Exp $ | 1 | # $Id: configure.ac,v 1.568 2014/01/30 00:26:46 djm Exp $ |
2 | # | 2 | # |
3 | # Copyright (c) 1999-2004 Damien Miller | 3 | # Copyright (c) 1999-2004 Damien Miller |
4 | # | 4 | # |
@@ -15,7 +15,7 @@ | |||
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
16 | 16 | ||
17 | AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org]) | 17 | AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org]) |
18 | AC_REVISION($Revision: 1.567 $) | 18 | AC_REVISION($Revision: 1.568 $) |
19 | AC_CONFIG_SRCDIR([ssh.c]) | 19 | AC_CONFIG_SRCDIR([ssh.c]) |
20 | AC_LANG([C]) | 20 | AC_LANG([C]) |
21 | 21 | ||
@@ -769,6 +769,8 @@ mips-sony-bsd|mips-sony-newsos4) | |||
769 | TEST_MALLOC_OPTIONS="AJRX" | 769 | TEST_MALLOC_OPTIONS="AJRX" |
770 | AC_DEFINE([BROKEN_STRNVIS], [1], | 770 | AC_DEFINE([BROKEN_STRNVIS], [1], |
771 | [NetBSD strnvis argument order is swapped compared to OpenBSD]) | 771 | [NetBSD strnvis argument order is swapped compared to OpenBSD]) |
772 | AC_DEFINE([BROKEN_READ_COMPARISON], [1], | ||
773 | [NetBSD read function is sometimes redirected, breaking atomicio comparisons against it]) | ||
772 | ;; | 774 | ;; |
773 | *-*-freebsd*) | 775 | *-*-freebsd*) |
774 | check_for_libcrypt_later=1 | 776 | check_for_libcrypt_later=1 |