Mercurial > dropbear
comparison netio.c @ 1708:58f7ca8ebc82
Set IOV_MAX for IRIX
author | Kazuo Kuroi <kazuo@irixnet.org> |
---|---|
date | Wed, 10 Jun 2020 22:09:29 +0800 |
parents | d384bc2e5af3 |
children | 97ad26e397a5 |
comparison
equal
deleted
inserted
replaced
1707:41a0ff8d5a89 | 1708:58f7ca8ebc82 |
---|---|
291 struct Link *l; | 291 struct Link *l; |
292 unsigned int i; | 292 unsigned int i; |
293 int len; | 293 int len; |
294 buffer *writebuf; | 294 buffer *writebuf; |
295 | 295 |
296 #ifndef IOV_MAX | 296 #ifndef IOV_MAX |
297 #if defined(__CYGWIN__) && !defined(UIO_MAXIOV) | 297 #if defined(__CYGWIN__) && !defined(UIO_MAXIOV) |
298 #define IOV_MAX 1024 | 298 #define IOV_MAX 1024 |
299 #else | 299 #elif defined(__sgi) |
300 #define IOV_MAX 512 | |
301 #else | |
300 #define IOV_MAX UIO_MAXIOV | 302 #define IOV_MAX UIO_MAXIOV |
301 #endif | |
302 #endif | 303 #endif |
304 #endif | |
303 | 305 |
304 *iov_count = MIN(MIN(queue->count, IOV_MAX), *iov_count); | 306 *iov_count = MIN(MIN(queue->count, IOV_MAX), *iov_count); |
305 | 307 |
306 for (l = queue->head, i = 0; i < *iov_count; l = l->link, i++) | 308 for (l = queue->head, i = 0; i < *iov_count; l = l->link, i++) |
307 { | 309 { |