summaryrefslogtreecommitdiff
path: root/misc/sys/uio.h
diff options
context:
space:
mode:
Diffstat (limited to 'misc/sys/uio.h')
-rw-r--r--misc/sys/uio.h61
1 files changed, 55 insertions, 6 deletions
diff --git a/misc/sys/uio.h b/misc/sys/uio.h
index 2c98077c57..ff586c7b16 100644
--- a/misc/sys/uio.h
+++ b/misc/sys/uio.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,15 +19,17 @@
#define _SYS_UIO_H 1
#include <features.h>
-
#include <sys/types.h>
+#include <bits/types/struct_iovec.h>
+#include <bits/uio_lim.h>
+#ifdef __IOV_MAX
+# define UIO_MAXIOV __IOV_MAX
+#else
+# undef UIO_MAXIOV
+#endif
__BEGIN_DECLS
-/* This file defines `struct iovec'. */
-#include <bits/uio.h>
-
-
/* Read data from file descriptor FD, and put the result in the
buffers described by IOVEC, which is a vector of COUNT 'struct iovec's.
The buffers are filled in the order specified.
@@ -76,6 +78,7 @@ extern ssize_t preadv (int __fd, const struct iovec *__iovec, int __count,
__THROW. */
extern ssize_t pwritev (int __fd, const struct iovec *__iovec, int __count,
__off_t __offset) __wur;
+
# else
# ifdef __REDIRECT
extern ssize_t __REDIRECT (preadv, (int __fd, const struct iovec *__iovec,
@@ -117,6 +120,52 @@ extern ssize_t pwritev64 (int __fd, const struct iovec *__iovec, int __count,
# endif
#endif /* Use misc. */
+
+#ifdef __USE_GNU
+# ifndef __USE_FILE_OFFSET64
+/* Same as preadv but with an additional flag argumenti defined at uio.h. */
+extern ssize_t preadv2 (int __fp, const struct iovec *__iovec, int __count,
+ __off_t __offset, int ___flags) __wur;
+
+/* Same as preadv but with an additional flag argument defined at uio.h. */
+extern ssize_t pwritev2 (int __fd, const struct iovec *__iodev, int __count,
+ __off_t __offset, int __flags) __wur;
+
+# else
+# ifdef __REDIRECT
+extern ssize_t __REDIRECT (pwritev2, (int __fd, const struct iovec *__iovec,
+ int __count, __off64_t __offset,
+ int __flags),
+ pwritev64v2) __wur;
+extern ssize_t __REDIRECT (preadv2, (int __fd, const struct iovec *__iovec,
+ int __count, __off64_t __offset,
+ int __flags),
+ preadv64v2) __wur;
+# else
+# define preadv2 preadv64v2
+# define pwritev2 pwritev64v2
+# endif
+# endif
+
+# ifdef __USE_LARGEFILE64
+/* Same as preadv but with an additional flag argumenti defined at uio.h. */
+extern ssize_t preadv64v2 (int __fp, const struct iovec *__iovec,
+ int __count, __off64_t __offset,
+ int ___flags) __wur;
+
+/* Same as preadv but with an additional flag argument defined at uio.h. */
+extern ssize_t pwritev64v2 (int __fd, const struct iovec *__iodev,
+ int __count, __off64_t __offset,
+ int __flags) __wur;
+# endif
+#endif /* Use GNU. */
+
__END_DECLS
+/* Some operating systems provide system-specific extensions to this
+ header. */
+#ifdef __USE_GNU
+# include <bits/uio-ext.h>
+#endif
+
#endif /* sys/uio.h */