@@ -7,5 +7,11 @@ extern ssize_t __readv (int __fd, const struct iovec *__iovec,
int __count);
extern ssize_t __writev (int __fd, const struct iovec *__iovec,
int __count);
+
+/* Used for p{read,write}{v64}v2 implementation. */
+libc_hidden_proto (preadv)
+libc_hidden_proto (preadv64)
+libc_hidden_proto (pwritev)
+libc_hidden_proto (pwritev64)
#endif
#endif
@@ -39,6 +39,7 @@ headers := sys/uio.h bits/uio.h sys/ioctl.h bits/ioctls.h bits/ioctl-types.h \
routines := brk sbrk sstk ioctl \
readv writev preadv preadv64 pwritev pwritev64 \
+ preadv2 preadv64v2 pwritev2 pwritev64v2 \
setreuid setregid \
seteuid setegid \
getpagesize \
@@ -79,7 +80,9 @@ gpl2lgpl := error.c error.h
tests := tst-dirname tst-tsearch tst-fdset tst-efgcvt tst-mntent tst-hsearch \
tst-error1 tst-pselect tst-insremque tst-mntent2 bug-hsearch1 \
tst-mntent-blank-corrupt tst-mntent-blank-passno bug18240 \
- tst-preadvwritev tst-preadvwritev64 tst-makedev tst-empty \
+ tst-preadvwritev tst-preadvwritev64 tst-preadvwritev2 \
+ tst-preadvwritev64v2 \
+ tst-makedev tst-empty \
tst-atomic tst-atomic-long
tests-static := tst-empty
@@ -155,6 +155,9 @@ libc {
GLIBC_2.25 {
gnu_dev_major; gnu_dev_minor; gnu_dev_makedev;
}
+ GLIBC_2.26 {
+ preadv2; preadv64v2; pwritev2; pwritev64v2;
+ }
GLIBC_PRIVATE {
__madvise;
__mktemp;
new file mode 100644
@@ -0,0 +1,30 @@
+/* Default implementation of preadv2.
+ Copyright (C) 2017 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sys/uio.h>
+
+/* Same as preadv but with an additional flags argument. */
+ssize_t
+preadv2 (int fd, const struct iovec *vector, int count, off_t offset,
+ int flags)
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+
+stub_warning (preadv2)
new file mode 100644
@@ -0,0 +1,30 @@
+/* Default implementation of preadv2 (LFS version).
+ Copyright (C) 2017 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sys/uio.h>
+
+/* Same as preadv64 but with an addional flag argument. */
+ssize_t
+preadv64v2 (int fd, const struct iovec *vector, int count, off64_t offset,
+ int flags)
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+
+stub_warning (preadv64v2)
new file mode 100644
@@ -0,0 +1,30 @@
+/* Default implementation of pwritev2.
+ Copyright (C) 2017 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sys/uio.h>
+
+/* Same as pwritev but with an additional flags argument. */
+ssize_t
+pwritev2 (int fd, const struct iovec *vector, int count, off_t offset,
+ int flags)
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+
+stub_warning (pwritev2)
new file mode 100644
@@ -0,0 +1,30 @@
+/* Default implementation of pwritev2 (LFS version).
+ Copyright (C) 2017 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sys/uio.h>
+
+/* Same as preadv64 but with an addional flag argument. */
+ssize_t
+pwritev64v2 (int fd, const struct iovec *vector, int count, off64_t offset,
+ int flags)
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+
+stub_warning (pwritev64v2)
@@ -65,6 +65,10 @@ extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count)
extern ssize_t preadv (int __fd, const struct iovec *__iovec, int __count,
__off_t __offset) __wur;
+/* 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;
+
/* Write data pointed by the buffers described by IOVEC, which is a
vector of COUNT 'struct iovec's, to file descriptor FD at the given
position OFFSET without change the file pointer. The data is
@@ -76,14 +80,26 @@ 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;
+
+/* 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 (preadv, (int __fd, const struct iovec *__iovec,
int __count, __off64_t __offset),
preadv64) __wur;
+extern ssize_t __REDIRECT (preadv2, (int __fd, const struct iovec *__iovec,
+ int __count, __off64_t __offset,
+ int __flags),
+ preadv64v2) __wur;
extern ssize_t __REDIRECT (pwritev, (int __fd, const struct iovec *__iovec,
int __count, __off64_t __offset),
pwritev64) __wur;
+extern ssize_t __REDIRECT (pwritev2, (int __fd, const struct iovec *__iovec,
+ int __count, __off64_t __offset,
+ int __flags),
+ pwritev64v2) __wur;
# else
# define preadv preadv64
# define pwritev pwritev64
@@ -18,6 +18,7 @@
#include <stdio.h>
#include <stdint.h>
+#include <errno.h>
#include <string.h>
#include <sys/uio.h>
#include <sys/stat.h>
@@ -39,6 +40,16 @@ do_prepare (int argc, char **argv)
}
#define PREPARE do_prepare
+#ifndef PREADV
+# define PREADV(__fd, __iov, __iovcnt, __offset) \
+ preadv (__fd, __iov, __iovcnt, __offset)
+#endif
+
+#ifndef PWRITEV
+# define PWRITEV(__fd, __iov, __iovcnt, __offset) \
+ pwritev (__fd, __iov, __iovcnt, __offset)
+#endif
+
static int
do_test_with_offset (off_t offset)
{
@@ -58,13 +69,13 @@ do_test_with_offset (off_t offset)
iov[1].iov_base = buf2;
iov[1].iov_len = sizeof buf2;
- ret = pwritev (temp_fd, iov, 2, offset);
+ ret = PWRITEV (temp_fd, iov, 2, offset);
if (ret == -1)
FAIL_RET ("first pwritev returned -1");
if (ret != (sizeof buf1 + sizeof buf2))
FAIL_RET ("first pwritev returned an unexpected value");
- ret = pwritev (temp_fd, iov, 2, sizeof buf1 + sizeof buf2 + offset);
+ ret = PWRITEV (temp_fd, iov, 2, sizeof buf1 + sizeof buf2 + offset);
if (ret == -1)
FAIL_RET ("second pwritev returned -1");
if (ret != (sizeof buf1 + sizeof buf2))
@@ -82,7 +93,7 @@ do_test_with_offset (off_t offset)
iov[1].iov_len = sizeof buf4;
/* Now read two buffer with 32 and 64 bytes respectively. */
- ret = preadv (temp_fd, iov, 2, offset);
+ ret = PREADV (temp_fd, iov, 2, offset);
if (ret == -1)
FAIL_RET ("first preadv returned -1");
if (ret != (sizeof buf3 + sizeof buf4))
@@ -93,7 +104,7 @@ do_test_with_offset (off_t offset)
if (memcmp (buf2, buf4, sizeof buf2) != 0)
FAIL_RET ("second buffer from first preadv different than expected");
- ret = preadv (temp_fd, iov, 2, sizeof buf3 + sizeof buf4 + offset);
+ ret = PREADV (temp_fd, iov, 2, sizeof buf3 + sizeof buf4 + offset);
if (ret == -1)
FAIL_RET ("second preadv returned -1");
if (ret != (sizeof buf3 + sizeof buf4))
new file mode 100644
@@ -0,0 +1,31 @@
+/* Tests for preadv2 and pwritev2.
+ Copyright (C) 2016-2017 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define PREADV(__fd, __iov, __iovcnt, __offset) \
+ preadv2 (__fd, __iov, __iovcnt, __offset, 0)
+
+#define PWRITEV(__fd, __iov, __iovcnt, __offset) \
+ pwritev2 (__fd, __iov, __iovcnt, __offset, 0)
+
+#include "tst-preadvwritev-common.c"
+
+static int
+do_test (void)
+{
+ return do_test_with_offset (0);
+}
new file mode 100644
@@ -0,0 +1,33 @@
+/* Tests for preadv2 and pwritev2 (LFS version).
+ Copyright (C) 2017 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define _FILE_OFFSET_BITS 64
+
+#define PREADV(__fd, __iov, __iovcnt, __offset) \
+ preadv2 (__fd, __iov, __iovcnt, __offset, 0)
+
+#define PWRITEV(__fd, __iov, __iovcnt, __offset) \
+ pwritev2 (__fd, __iov, __iovcnt, __offset, 0)
+
+#include "tst-preadvwritev-common.c"
+
+static int
+do_test (void)
+{
+ return do_test_with_offset (0);
+}
@@ -1257,6 +1257,85 @@ tf_pwritev (void *arg)
}
static void *
+tf_pwritev2 (void *arg)
+{
+ int fd;
+ int r;
+
+ if (arg == NULL)
+ /* XXX If somebody can provide a portable test case in which pwritev2
+ blocks we can enable this test to run in both rounds. */
+ abort ();
+
+ errno = 0;
+
+ char fname[] = "/tmp/tst-cancel4-fd-XXXXXX";
+ tempfd = fd = mkstemp (fname);
+ if (fd == -1)
+ FAIL_EXIT1 ("mkstemp: %m");
+ unlink (fname);
+
+ r = pthread_barrier_wait (&b2);
+ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD)
+ FAIL_EXIT1 ("pthread_barrier_wait: %m");
+
+ r = pthread_barrier_wait (&b2);
+ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD)
+ FAIL_EXIT1 ("pthread_barrier_wait: %m");
+
+ ssize_t s;
+ pthread_cleanup_push (cl, NULL);
+
+ char buf[WRITE_BUFFER_SIZE];
+ memset (buf, '\0', sizeof (buf));
+ struct iovec iov[1] = { [0] = { .iov_base = buf, .iov_len = sizeof (buf) } };
+ s = pwritev2 (fd, iov, 1, 0, 0);
+
+ pthread_cleanup_pop (0);
+
+ FAIL_EXIT1 ("pwritev returns with %zd", s);
+}
+
+static void *
+tf_preadv2 (void *arg)
+{
+ int fd;
+ int r;
+
+ if (arg == NULL)
+ /* XXX If somebody can provide a portable test case in which preadv2
+ blocks we can enable this test to run in both rounds. */
+ abort ();
+
+ errno = 0;
+
+ char fname[] = "/tmp/tst-cancel4-fd-XXXXXX";
+ tempfd = fd = mkstemp (fname);
+ if (fd == -1)
+ FAIL_EXIT1 ("mkstemp: %m");
+ unlink (fname);
+
+ r = pthread_barrier_wait (&b2);
+ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD)
+ FAIL_EXIT1 ("pthread_barrier_wait: %m");
+
+ r = pthread_barrier_wait (&b2);
+ if (r != 0 && r != PTHREAD_BARRIER_SERIAL_THREAD)
+ FAIL_EXIT1 ("pthread_barrier_wait: %m");
+
+ ssize_t s;
+ pthread_cleanup_push (cl, NULL);
+
+ char buf[100];
+ struct iovec iov[1] = { [0] = { .iov_base = buf, .iov_len = sizeof (buf) } };
+ s = preadv2 (fd, iov, 1, 0, 0);
+
+ pthread_cleanup_pop (0);
+
+ FAIL_EXIT1 ("preadv2 returns with %zd", s);
+}
+
+static void *
tf_fsync (void *arg)
{
if (arg == NULL)
@@ -1705,7 +1784,9 @@ struct cancel_tests tests[] =
ADD_TEST (recvfrom, 2, 0),
ADD_TEST (recvmsg, 2, 0),
ADD_TEST (preadv, 2, 1),
+ ADD_TEST (preadv2, 2, 1),
ADD_TEST (pwritev, 2, 1),
+ ADD_TEST (pwritev2, 2, 1),
ADD_TEST (open, 2, 1),
ADD_TEST (close, 2, 1),
ADD_TEST (pread, 2, 1),
new file mode 100644
@@ -0,0 +1,32 @@
+/* Generic version of preadv2.
+ Copyright (C) 2017 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <unistd.h>
+#include <sys/uio.h>
+
+#ifndef __OFF_T_MATCHES_OFF64_T
+
+/* Since we define no flags for preadv2 just route to preadv. */
+ssize_t
+preadv2 (int fd, const struct iovec *vector, int count, OFF_T offset,
+ int flags)
+{
+ return preadv (fd, vector, count, offset);
+}
+
+#endif
new file mode 100644
@@ -0,0 +1,31 @@
+/* Generic version of preadv2.
+ Copyright (C) 2017 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <unistd.>
+#include <sys/uio.h>
+
+ssize_t
+preadv64v2 (int fd, const struct iovec *vector, int count, OFF_T offset,
+ int flags)
+{
+ return preadv64 (fd, vector, count, offset);
+}
+
+#ifdef __OFF_T_MATCHES_OFF64_T
+strong_alias (preadv64v2, preadv2)
+#endif
new file mode 100644
@@ -0,0 +1,32 @@
+/* Generic version of pwritev2.
+ Copyright (C) 2017 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <unistd.h>
+#include <sys/uio.h>
+
+#ifndef __OFF_T_MATCHES_OFF64_T
+
+/* Since we define no flags for pwritev2 just route to pwritev. */
+ssize_t
+pwritev2 (int fd, const struct iovec *vector, int count, OFF_T offset,
+ int flags)
+{
+ return pwritev (fd, vector, count, offset);
+}
+
+#endif
new file mode 100644
@@ -0,0 +1,32 @@
+/* Generic version of pwritev2.
+ Copyright (C) 2017 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <unistd.h>
+#include <sys/uio.h>
+
+/* Since we define no flags for pwritev2 just route to pwritev. */
+ssize_t
+pwritev64v2 (int fd, const struct iovec *vector, int count, OFF_T offset,
+ int flags)
+{
+ return pwritev64 (fd, vector, count, offset);
+}
+
+#ifdef __OFF_T_MATCHES_OFF64_T
+strong_alias (pwritev64v2, pwritev2)
+#endif
@@ -2097,3 +2097,8 @@ GLIBC_2.25 getrandom F
GLIBC_2.25 strfromd F
GLIBC_2.25 strfromf F
GLIBC_2.25 strfroml F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 preadv2 F
+GLIBC_2.26 preadv64v2 F
+GLIBC_2.26 pwritev2 F
+GLIBC_2.26 pwritev64v2 F
@@ -2008,6 +2008,11 @@ GLIBC_2.25 getrandom F
GLIBC_2.25 strfromd F
GLIBC_2.25 strfromf F
GLIBC_2.25 strfroml F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 preadv2 F
+GLIBC_2.26 preadv64v2 F
+GLIBC_2.26 pwritev2 F
+GLIBC_2.26 pwritev64v2 F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -98,6 +98,11 @@ GLIBC_2.25 getrandom F
GLIBC_2.25 strfromd F
GLIBC_2.25 strfromf F
GLIBC_2.25 strfroml F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 preadv2 F
+GLIBC_2.26 preadv64v2 F
+GLIBC_2.26 pwritev2 F
+GLIBC_2.26 pwritev64v2 F
GLIBC_2.4 GLIBC_2.4 A
GLIBC_2.4 _Exit F
GLIBC_2.4 _IO_2_1_stderr_ D 0xa0
@@ -69,4 +69,10 @@ extern ssize_t process_vm_writev (pid_t __pid, const struct iovec *__lvec,
__END_DECLS
# endif
+
+/* Flags for preadv2/pwritev2: */
+#define RWF_HIPRI 0x00000001 /* High priority request. */
+#define RWF_DSYNC 0x00000002 /* per-IO O_DSYNC. */
+#define RWF_SYNC 0x00000004 /* per-IO O_SYNC. */
+
#endif
@@ -1862,6 +1862,11 @@ GLIBC_2.25 getrandom F
GLIBC_2.25 strfromd F
GLIBC_2.25 strfromf F
GLIBC_2.25 strfroml F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 preadv2 F
+GLIBC_2.26 preadv64v2 F
+GLIBC_2.26 pwritev2 F
+GLIBC_2.26 pwritev64v2 F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -2020,6 +2020,11 @@ GLIBC_2.25 getrandom F
GLIBC_2.25 strfromd F
GLIBC_2.25 strfromf F
GLIBC_2.25 strfroml F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 preadv2 F
+GLIBC_2.26 preadv64v2 F
+GLIBC_2.26 pwritev2 F
+GLIBC_2.26 pwritev64v2 F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -1884,6 +1884,11 @@ GLIBC_2.25 getrandom F
GLIBC_2.25 strfromd F
GLIBC_2.25 strfromf F
GLIBC_2.25 strfroml F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 preadv2 F
+GLIBC_2.26 preadv64v2 F
+GLIBC_2.26 pwritev2 F
+GLIBC_2.26 pwritev64v2 F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -99,6 +99,11 @@ GLIBC_2.25 getrandom F
GLIBC_2.25 strfromd F
GLIBC_2.25 strfromf F
GLIBC_2.25 strfroml F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 preadv2 F
+GLIBC_2.26 preadv64v2 F
+GLIBC_2.26 pwritev2 F
+GLIBC_2.26 pwritev64v2 F
GLIBC_2.4 GLIBC_2.4 A
GLIBC_2.4 _Exit F
GLIBC_2.4 _IO_2_1_stderr_ D 0x98
@@ -1976,6 +1976,11 @@ GLIBC_2.25 getrandom F
GLIBC_2.25 strfromd F
GLIBC_2.25 strfromf F
GLIBC_2.25 strfroml F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 preadv2 F
+GLIBC_2.26 preadv64v2 F
+GLIBC_2.26 pwritev2 F
+GLIBC_2.26 pwritev64v2 F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -2097,3 +2097,8 @@ GLIBC_2.25 getrandom F
GLIBC_2.25 strfromd F
GLIBC_2.25 strfromf F
GLIBC_2.25 strfroml F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 preadv2 F
+GLIBC_2.26 preadv64v2 F
+GLIBC_2.26 pwritev2 F
+GLIBC_2.26 pwritev64v2 F
@@ -1951,6 +1951,11 @@ GLIBC_2.25 getrandom F
GLIBC_2.25 strfromd F
GLIBC_2.25 strfromf F
GLIBC_2.25 strfroml F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 preadv2 F
+GLIBC_2.26 preadv64v2 F
+GLIBC_2.26 pwritev2 F
+GLIBC_2.26 pwritev64v2 F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -1949,6 +1949,11 @@ GLIBC_2.25 getrandom F
GLIBC_2.25 strfromd F
GLIBC_2.25 strfromf F
GLIBC_2.25 strfroml F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 preadv2 F
+GLIBC_2.26 preadv64v2 F
+GLIBC_2.26 pwritev2 F
+GLIBC_2.26 pwritev64v2 F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -1947,6 +1947,11 @@ GLIBC_2.25 getrandom F
GLIBC_2.25 strfromd F
GLIBC_2.25 strfromf F
GLIBC_2.25 strfroml F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 preadv2 F
+GLIBC_2.26 preadv64v2 F
+GLIBC_2.26 pwritev2 F
+GLIBC_2.26 pwritev64v2 F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -1942,6 +1942,11 @@ GLIBC_2.25 getrandom F
GLIBC_2.25 strfromd F
GLIBC_2.25 strfromf F
GLIBC_2.25 strfroml F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 preadv2 F
+GLIBC_2.26 preadv64v2 F
+GLIBC_2.26 pwritev2 F
+GLIBC_2.26 pwritev64v2 F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -2138,3 +2138,8 @@ GLIBC_2.25 getrandom F
GLIBC_2.25 strfromd F
GLIBC_2.25 strfromf F
GLIBC_2.25 strfroml F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 preadv2 F
+GLIBC_2.26 preadv64v2 F
+GLIBC_2.26 pwritev2 F
+GLIBC_2.26 pwritev64v2 F
@@ -1980,6 +1980,11 @@ GLIBC_2.25 getrandom F
GLIBC_2.25 strfromd F
GLIBC_2.25 strfromf F
GLIBC_2.25 strfroml F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 preadv2 F
+GLIBC_2.26 preadv64v2 F
+GLIBC_2.26 pwritev2 F
+GLIBC_2.26 pwritev64v2 F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -1985,6 +1985,11 @@ GLIBC_2.25 getrandom F
GLIBC_2.25 strfromd F
GLIBC_2.25 strfromf F
GLIBC_2.25 strfroml F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 preadv2 F
+GLIBC_2.26 preadv64v2 F
+GLIBC_2.26 pwritev2 F
+GLIBC_2.26 pwritev64v2 F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -2185,3 +2185,8 @@ GLIBC_2.25 getrandom F
GLIBC_2.25 strfromd F
GLIBC_2.25 strfromf F
GLIBC_2.25 strfroml F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 preadv2 F
+GLIBC_2.26 preadv64v2 F
+GLIBC_2.26 pwritev2 F
+GLIBC_2.26 pwritev64v2 F
@@ -99,6 +99,11 @@ GLIBC_2.25 getrandom F
GLIBC_2.25 strfromd F
GLIBC_2.25 strfromf F
GLIBC_2.25 strfroml F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 preadv2 F
+GLIBC_2.26 preadv64v2 F
+GLIBC_2.26 pwritev2 F
+GLIBC_2.26 pwritev64v2 F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 _Exit F
GLIBC_2.3 _IO_2_1_stderr_ D 0xe0
@@ -50,4 +50,6 @@ preadv (int fd, const struct iovec *vector, int count, off_t offset)
# define OFF_T off_t
# include <sysdeps/posix/preadv.c>
# endif /* __ASSUME_PREADV */
+
+libc_hidden_def (preadv)
#endif
new file mode 100644
@@ -0,0 +1,51 @@
+/* Linux implementation of preadv2.
+ Copyright (C) 2017 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sys/uio.h>
+#include <sysdep-cancel.h>
+
+#ifndef __OFF_T_MATCHES_OFF64_T
+
+# if !defined (__NR_preadv2) && defined (__NR_pread64v2)
+# define __NR_preadv2 __NR_pread64v2
+# endif
+
+ssize_t
+preadv2 (int fd, const struct iovec *vector, int count, off_t offset,
+ int flags)
+{
+# ifdef __NR_preadv2
+ ssize_t result = SYSCALL_CANCEL (preadv2, fd, vector, count,
+ LO_HI_LONG (offset), flags);
+ if (result >= 0 || errno != ENOSYS)
+ return result;
+# endif
+ /* Trying to emulate the preadv2 syscall flags is troublesome:
+
+ * We can not temporary change the file state of the O_DSYNC and O_SYNC
+ flags to emulate RWF_{D}SYNC (attempts to change the state of using
+ fcntl silently ignored).
+
+ * IOCB_HIPRI requires the file opened in O_DIRECT and uses an internal
+ semantic not provided by any other flag (O_NONBLOCK for instance).
+
+ So for generic case just ignore the flags can call preadv directly. */
+ return preadv (fd, vector, count, offset);
+}
+
+#endif
@@ -48,7 +48,9 @@ preadv64 (int fd, const struct iovec *vector, int count, off64_t offset)
# define OFF_T off64_t
# include <sysdeps/posix/preadv.c>
#endif
+libc_hidden_def (preadv64)
#ifdef __OFF_T_MATCHES_OFF64_T
strong_alias (preadv64, preadv)
+libc_hidden_def (preadv)
#endif
new file mode 100644
@@ -0,0 +1,51 @@
+/* Linux implementation of preadv2 (LFS version).
+ Copyright (C) 2017 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sys/uio.h>
+#include <sysdep-cancel.h>
+
+#if !defined(__NR_preadv64v2) && defined(__NR_preadv2)
+# define __NR_preadv64v2 __NR_preadv2
+#endif
+
+ssize_t
+preadv64v2 (int fd, const struct iovec *vector, int count, off64_t offset,
+ int flags)
+{
+#ifdef __NR_preadv64v2
+ ssize_t result = SYSCALL_CANCEL (preadv64v2, fd, vector, count,
+ LO_HI_LONG (offset), flags);
+ if (result >= 0 || errno != ENOSYS)
+ return result;
+#endif
+ /* Trying to emulate the preadv2 syscall flags is troublesome:
+
+ * We can not temporary change the file state of the O_DSYNC and O_SYNC
+ flags to emulate RWF_{D}SYNC (attempts to change the state of using
+ fcntl silently ignored).
+
+ * IOCB_HIPRI requires the file opened in O_DIRECT and uses an internal
+ semantic not provided by any other flag (O_NONBLOCK for instance).
+
+ So for generic case just ignore the flags can call preadv directly. */
+ return preadv64 (fd, vector, count, offset);
+}
+
+#ifdef __OFF_T_MATCHES_OFF64_T
+strong_alias (preadv64v2, preadv2)
+#endif
@@ -28,6 +28,7 @@ __libc_pwrite64 (int fd, const void *buf, size_t count, off64_t offset)
{
return SYSCALL_CANCEL (pwrite64, fd, buf, count, SYSCALL_LL64_PRW (offset));
}
+
weak_alias (__libc_pwrite64, __pwrite64)
libc_hidden_weak (__pwrite64)
weak_alias (__libc_pwrite64, pwrite64)
@@ -50,4 +50,6 @@ pwritev (int fd, const struct iovec *vector, int count, off_t offset)
# define OFF_T off_t
# include <sysdeps/posix/pwritev.c>
# endif /* __ASSUME_PREADV */
+
+libc_hidden_def (pwritev)
#endif
new file mode 100644
@@ -0,0 +1,47 @@
+/* Linux implementation of pwritev2.
+ Copyright (C) 2017 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sys/uio.h>
+#include <sysdep-cancel.h>
+
+#ifndef __OFF_T_MATCHES_OFF64_T
+
+ssize_t
+pwritev2 (int fd, const struct iovec *vector, int count, off_t offset,
+ int flags)
+{
+# ifdef __NR_pwritev2
+ ssize_t result = SYSCALL_CANCEL (pwritev2, fd, vector, count,
+ LO_HI_LONG (offset), flags);
+ if (result >= 0 || errno != ENOSYS)
+ return result;
+# endif
+ /* Trying to emulate the pwritev2 syscall flags is troublesome:
+
+ * We can not temporary change the file state of the O_DSYNC and O_SYNC
+ flags to emulate RWF_{D}SYNC (attempts to change the state of using
+ fcntl silently ignored).
+
+ * IOCB_HIPRI requires the file opened in O_DIRECT and uses an internal
+ semantic not provided by any other flag (O_NONBLOCK for instance).
+
+ So for generic case just ignore the flags can call pwritev directly. */
+ return pwritev (fd, vector, count, offset);
+}
+
+#endif
@@ -48,7 +48,9 @@ pwritev64 (int fd, const struct iovec *vector, int count, off64_t offset)
# define OFF_T off64_t
# include <sysdeps/posix/pwritev.c>
#endif
+libc_hidden_def (pwritev64)
#ifdef __OFF_T_MATCHES_OFF64_T
strong_alias (pwritev64, pwritev)
+libc_hidden_def (pwritev)
#endif
new file mode 100644
@@ -0,0 +1,51 @@
+/* Linux implementation of pwritev2 (LFS version).
+ Copyright (C) 2017 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <sys/uio.h>
+#include <sysdep-cancel.h>
+
+#if !defined(__NR_pwritev64v2) && defined(__NR_pwritev2)
+# define __NR_pwritev64v2 __NR_pwritev2
+#endif
+
+ssize_t
+pwritev64v2 (int fd, const struct iovec *vector, int count, off64_t offset,
+ int flags)
+{
+#ifdef __NR_pwritev64v2
+ ssize_t result = SYSCALL_CANCEL (pwritev64v2, fd, vector, count,
+ LO_HI_LONG (offset), flags);
+ if (result >= 0 || errno != ENOSYS)
+ return result;
+#endif
+ /* Trying to emulate the pwritev2 syscall flags is troublesome:
+
+ * We can not temporary change the file state of the O_DSYNC and O_SYNC
+ flags to emulate RWF_{D}SYNC (attempts to change the state of using
+ fcntl silently ignored).
+
+ * IOCB_HIPRI requires the file opened in O_DIRECT and uses an internal
+ semantic not provided by any other flag (O_NONBLOCK for instance).
+
+ So for generic case just ignore the flags can call pwritev directly. */
+ return pwritev64 (fd, vector, count, offset);
+}
+
+#ifdef __OFF_T_MATCHES_OFF64_T
+strong_alias (pwritev64v2, pwritev2)
+#endif
@@ -1980,6 +1980,11 @@ GLIBC_2.25 getrandom F
GLIBC_2.25 strfromd F
GLIBC_2.25 strfromf F
GLIBC_2.25 strfroml F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 preadv2 F
+GLIBC_2.26 preadv64v2 F
+GLIBC_2.26 pwritev2 F
+GLIBC_2.26 pwritev64v2 F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -1881,6 +1881,11 @@ GLIBC_2.25 getrandom F
GLIBC_2.25 strfromd F
GLIBC_2.25 strfromf F
GLIBC_2.25 strfroml F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 preadv2 F
+GLIBC_2.26 preadv64v2 F
+GLIBC_2.26 pwritev2 F
+GLIBC_2.26 pwritev64v2 F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -1866,6 +1866,11 @@ GLIBC_2.25 getrandom F
GLIBC_2.25 strfromd F
GLIBC_2.25 strfromf F
GLIBC_2.25 strfroml F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 preadv2 F
+GLIBC_2.26 preadv64v2 F
+GLIBC_2.26 pwritev2 F
+GLIBC_2.26 pwritev64v2 F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -1972,6 +1972,11 @@ GLIBC_2.25 getrandom F
GLIBC_2.25 strfromd F
GLIBC_2.25 strfromf F
GLIBC_2.25 strfroml F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 preadv2 F
+GLIBC_2.26 preadv64v2 F
+GLIBC_2.26 pwritev2 F
+GLIBC_2.26 pwritev64v2 F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -1910,6 +1910,11 @@ GLIBC_2.25 getrandom F
GLIBC_2.25 strfromd F
GLIBC_2.25 strfromf F
GLIBC_2.25 strfroml F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 preadv2 F
+GLIBC_2.26 preadv64v2 F
+GLIBC_2.26 pwritev2 F
+GLIBC_2.26 pwritev64v2 F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -2104,3 +2104,8 @@ GLIBC_2.25 getrandom F
GLIBC_2.25 strfromd F
GLIBC_2.25 strfromf F
GLIBC_2.25 strfroml F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 preadv2 F
+GLIBC_2.26 preadv64v2 F
+GLIBC_2.26 pwritev2 F
+GLIBC_2.26 pwritev64v2 F
@@ -2104,3 +2104,8 @@ GLIBC_2.25 getrandom F
GLIBC_2.25 strfromd F
GLIBC_2.25 strfromf F
GLIBC_2.25 strfroml F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 preadv2 F
+GLIBC_2.26 preadv64v2 F
+GLIBC_2.26 pwritev2 F
+GLIBC_2.26 pwritev64v2 F
@@ -2104,3 +2104,8 @@ GLIBC_2.25 getrandom F
GLIBC_2.25 strfromd F
GLIBC_2.25 strfromf F
GLIBC_2.25 strfroml F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 preadv2 F
+GLIBC_2.26 preadv64v2 F
+GLIBC_2.26 pwritev2 F
+GLIBC_2.26 pwritev64v2 F
@@ -1861,6 +1861,11 @@ GLIBC_2.25 getrandom F
GLIBC_2.25 strfromd F
GLIBC_2.25 strfromf F
GLIBC_2.25 strfroml F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 preadv2 F
+GLIBC_2.26 preadv64v2 F
+GLIBC_2.26 pwritev2 F
+GLIBC_2.26 pwritev64v2 F
GLIBC_2.3 GLIBC_2.3 A
GLIBC_2.3 __ctype_b_loc F
GLIBC_2.3 __ctype_tolower_loc F
@@ -2104,3 +2104,8 @@ GLIBC_2.25 getrandom F
GLIBC_2.25 strfromd F
GLIBC_2.25 strfromf F
GLIBC_2.25 strfroml F
+GLIBC_2.26 GLIBC_2.26 A
+GLIBC_2.26 preadv2 F
+GLIBC_2.26 preadv64v2 F
+GLIBC_2.26 pwritev2 F
+GLIBC_2.26 pwritev64v2 F