| /*------------------------------------------------------------------------- | |
| * | |
| * pg_iovec.h | |
| * Header for vectored I/O functions, to use in place of <sys/uio.h>. | |
| * | |
| * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group | |
| * Portions Copyright (c) 1994, Regents of the University of California | |
| * | |
| * src/include/port/pg_iovec.h | |
| * | |
| *------------------------------------------------------------------------- | |
| */ | |
| /* POSIX requires at least 16 as a maximum iovcnt. */ | |
| /* Define our own POSIX-compatible iovec struct. */ | |
| struct iovec | |
| { | |
| void *iov_base; | |
| size_t iov_len; | |
| }; | |
| /* Define a reasonable maximum that is safe to use on the stack. */ | |
| /* | |
| * Note that pg_preadv and pg_pwritev have a pg_ prefix as a warning that the | |
| * Windows implementations have the side-effect of changing the file position. | |
| */ | |
| extern ssize_t pg_preadv(int fd, const struct iovec *iov, int iovcnt, off_t offset); | |
| extern ssize_t pg_pwritev(int fd, const struct iovec *iov, int iovcnt, off_t offset); | |