* miscfuncs.cc (check_iovec_for_read): Don't check buffer when zero length
iov_len. (check_iovec_for_write): Ditto. * fhandler.h (fhandler_base::readv): New method. (fhandler_base::writev): Ditto. * fhandler.cc (fhandler_base::readv): New method. (fhandler_base::writev): Ditto. * syscalls.cc (_read): Delegate to readv(2). (_write): Ditto, mutatis mutandi. (readv): Rewrite, based on the old _read code, to use the new fhandler_base::readv method. Improve access mode handling and ensure all calls reach the final strace statement. (writev): Ditto, mutatis mutandi. * include/sys/uio.h (struct iovec): Change field types to match SUSv3. * winsup.h (check_iovec_for_read): New function. (check_iovec_for_write): Ditto. * miscfuncs.cc (check_iovec_for_read): Ditto. (check_iovec_for_write): Ditto.
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
/* sys/uio.h
|
||||
|
||||
Copyright 1996, 2000, 2001 Red Hat, Inc.
|
||||
Copyright 1996, 2000, 2001, 2002 Red Hat, Inc.
|
||||
|
||||
This file is part of Cygwin.
|
||||
|
||||
@ -24,9 +24,10 @@ __BEGIN_DECLS
|
||||
* Define the uio buffers used for writev, readv.
|
||||
*/
|
||||
|
||||
struct iovec {
|
||||
caddr_t iov_base;
|
||||
int iov_len;
|
||||
struct iovec
|
||||
{
|
||||
void *iov_base;
|
||||
size_t iov_len;
|
||||
};
|
||||
|
||||
extern ssize_t readv __P ((int filedes, const struct iovec *vector, int count));
|
||||
|
Reference in New Issue
Block a user