diff options
author | Christopher Faylor <me@cgf.cx> | 2002-08-30 15:47:10 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-08-30 15:47:10 +0000 |
commit | ab7f9b938f8f0008fe71e8c790afb7f86a267e1c (patch) | |
tree | f8149696d46c25222099b0d51dab157e891e3037 /winsup/cygwin/fhandler.h | |
parent | 70c306d781b881d7142d2d99f481b0aace248270 (diff) | |
download | newlib-ab7f9b938f8f0008fe71e8c790afb7f86a267e1c.zip newlib-ab7f9b938f8f0008fe71e8c790afb7f86a267e1c.tar.gz newlib-ab7f9b938f8f0008fe71e8c790afb7f86a267e1c.tar.bz2 |
* 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.
Diffstat (limited to 'winsup/cygwin/fhandler.h')
-rw-r--r-- | winsup/cygwin/fhandler.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index ec72091..a63c051 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -116,6 +116,7 @@ class path_conv; class fhandler_disk_file; typedef struct __DIR DIR; struct dirent; +struct iovec; enum bg_check_types { @@ -297,6 +298,8 @@ class fhandler_base virtual char const * ttyname () { return get_name(); } virtual int __stdcall read (void *ptr, size_t len) __attribute__ ((regparm (3))); virtual int write (const void *ptr, size_t len); + virtual ssize_t readv (const struct iovec *, int iovcnt, ssize_t tot = -1); + virtual ssize_t writev (const struct iovec *, int iovcnt, ssize_t tot = -1); virtual __off64_t lseek (__off64_t offset, int whence); virtual int lock (int, struct flock *); virtual void dump (); |