pread64_nocancel write_nocancel pwrite64_nocancel
endif
+ifeq (misc, $(subdir))
+sysdep_routines += writev_nocancel writev_nocancel_nostatus
+endif
+
ifeq ($(subdir),sunrpc)
sysdep_headers += nfs/nfs.h
endif
/* Non cancellable pwrite syscall (LFS version). */
__typeof (__pwrite64) __pwrite64_nocancel;
-#define __writev_nocancel_nostatus(fd, iov, n) \
- (void) __writev (fd, iov, n)
+/* Non cancellable writev syscall. */
+__typeof (__writev) __writev_nocancel;
+
+/* Non cancellable writev syscall with no status. */
+void __writev_nocancel_nostatus (int fd, const struct iovec *vector, int count);
+
# define __waitpid_nocancel(pid, stat_loc, options) \
__waitpid (pid, stat_loc, options)
#define __fcntl64_nocancel(fd, cmd, ...) \
hidden_proto (__pread64_nocancel)
hidden_proto (__write_nocancel)
hidden_proto (__pwrite64_nocancel)
+hidden_proto (__writev_nocancel)
+hidden_proto (__writev_nocancel_nostatus)
hidden_proto (__close_nocancel_nostatus)
#endif
--- /dev/null
+/* Copyright (C) 1991-2020 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
+ <https://www.gnu.org/licenses/>. */
+
+#include <errno.h>
+#include <not-cancel.h>
+
+void
+__writev_nocancel_nostatus (int fd, const struct iovec *vector, int count)
+{
+ int save = errno;
+ __writev_nocancel (fd, vector, count);
+ __set_errno (save);
+}
+libc_hidden_weak (__writev_nocancel_nostatus)
return bytes_written;
}
libc_hidden_def (__writev)
+#ifndef __writev
weak_alias (__writev, writev)
+#endif
--- /dev/null
+#include <not-cancel.h>
+#define __writev __writev_nocancel
+#define __write __write_nocancel
+#include <sysdeps/posix/writev.c>