[Libsysio-commit] HEAD: libsysio/drivers/native fs_native.c
Brought to you by:
lward
From: Sonja T. <so...@us...> - 2004-08-13 15:02:59
|
Update of /cvsroot/libsysio/libsysio/drivers/native In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11990/drivers/native Modified Files: fs_native.c Log Message: Try 2: take out the MAX_IOVEC references, revert fs_native.c back to its original form (which still has the MAX_IOVEC references, but it defines it and undefines it within one routine...although this still means that someone can define MAX_IOVEC and force the call to _sysio_enumerate_iovec instead of the syscall, but that doesn't place any strict limit on the number of iovecs) Index: fs_native.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/drivers/native/fs_native.c,v retrieving revision 1.45 retrieving revision 1.46 diff -u -w -b -B -p -r1.45 -r1.46 --- fs_native.c 13 Aug 2004 14:40:09 -0000 1.45 +++ fs_native.c 13 Aug 2004 15:02:50 -0000 1.46 @@ -1398,6 +1398,10 @@ doiov(const struct iovec *iov, { ssize_t cc; +#if !(defined(REDSTORM) || defined(MAX_IOVEC)) +#define MAX_IOVEC INT_MAX +#endif + if (count <= 0) return -EINVAL; @@ -1422,11 +1426,7 @@ doiov(const struct iovec *iov, */ cc = #ifndef REDSTORM -#ifdef MAX_IOVEC count <= MAX_IOVEC -#else - count <= INT_MAX -#endif ? syscall(nio->nio_op == 'r' ? SYS_readv : SYS_writev, nio->nio_nino->ni_fd, iov, |