public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Florian Weimer <fw@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc/fw/syscall-cleanups] Linux: Clean up preadv, pwritev system call names Date: Sun, 09 Feb 2020 16:56:00 -0000 [thread overview] Message-ID: <20200209165637.28207.qmail@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=73e1a225ad623b0dff1bdd99574030bbe32a16a8 commit 73e1a225ad623b0dff1bdd99574030bbe32a16a8 Author: Florian Weimer <fweimer@redhat.com> Date: Sun Feb 9 16:20:47 2020 +0100 Linux: Clean up preadv, pwritev system call names The names __NR_preadv64, __NR_pwritev64 appear to be a glibc invention. With the built-in tables, __NR_preadv and __NR_pwritev are always defined. Diff: --- sysdeps/unix/sysv/linux/preadv.c | 6 ------ sysdeps/unix/sysv/linux/preadv64.c | 10 ++-------- sysdeps/unix/sysv/linux/pwritev.c | 6 ------ sysdeps/unix/sysv/linux/pwritev64.c | 10 ++-------- 4 files changed, 4 insertions(+), 28 deletions(-) diff --git a/sysdeps/unix/sysv/linux/preadv.c b/sysdeps/unix/sysv/linux/preadv.c index 2a55d8c..9fccb91 100644 --- a/sysdeps/unix/sysv/linux/preadv.c +++ b/sysdeps/unix/sysv/linux/preadv.c @@ -22,10 +22,6 @@ # ifdef __ASSUME_PREADV -# ifndef __NR_preadv -# define __NR_preadv __NR_preadv64 -# endif - ssize_t preadv (int fd, const struct iovec *vector, int count, off_t offset) { @@ -37,12 +33,10 @@ static ssize_t __atomic_preadv_replacement (int, const struct iovec *, ssize_t preadv (int fd, const struct iovec *vector, int count, off_t offset) { -# ifdef __NR_preadv ssize_t result = SYSCALL_CANCEL (preadv, fd, vector, count, LO_HI_LONG (offset)); if (result >= 0 || errno != ENOSYS) return result; -# endif return __atomic_preadv_replacement (fd, vector, count, offset); } # define PREADV static __atomic_preadv_replacement diff --git a/sysdeps/unix/sysv/linux/preadv64.c b/sysdeps/unix/sysv/linux/preadv64.c index fb471f0..9fe4352 100644 --- a/sysdeps/unix/sysv/linux/preadv64.c +++ b/sysdeps/unix/sysv/linux/preadv64.c @@ -20,14 +20,10 @@ #ifdef __ASSUME_PREADV -# ifndef __NR_preadv64 -# define __NR_preadv64 __NR_preadv -# endif - ssize_t preadv64 (int fd, const struct iovec *vector, int count, off64_t offset) { - return SYSCALL_CANCEL (preadv64, fd, vector, count, LO_HI_LONG (offset)); + return SYSCALL_CANCEL (preadv, fd, vector, count, LO_HI_LONG (offset)); } #else static ssize_t __atomic_preadv64_replacement (int, const struct iovec *, @@ -35,12 +31,10 @@ static ssize_t __atomic_preadv64_replacement (int, const struct iovec *, ssize_t preadv64 (int fd, const struct iovec *vector, int count, off64_t offset) { -#ifdef __NR_preadv64 - ssize_t result = SYSCALL_CANCEL (preadv64, fd, vector, count, + ssize_t result = SYSCALL_CANCEL (preadv, fd, vector, count, LO_HI_LONG (offset)); if (result >= 0 || errno != ENOSYS) return result; -#endif return __atomic_preadv64_replacement (fd, vector, count, offset); } # define PREADV static __atomic_preadv64_replacement diff --git a/sysdeps/unix/sysv/linux/pwritev.c b/sysdeps/unix/sysv/linux/pwritev.c index 7abe47b..d6cb3c8 100644 --- a/sysdeps/unix/sysv/linux/pwritev.c +++ b/sysdeps/unix/sysv/linux/pwritev.c @@ -22,10 +22,6 @@ # ifdef __ASSUME_PREADV -# ifndef __NR_pwritev -# define __NR_pwritev __NR_pwritev64 -# endif - ssize_t pwritev (int fd, const struct iovec *vector, int count, off_t offset) { @@ -37,12 +33,10 @@ static ssize_t __atomic_pwritev_replacement (int, const struct iovec *, ssize_t pwritev (int fd, const struct iovec *vector, int count, off_t offset) { -# ifdef __NR_pwritev ssize_t result = SYSCALL_CANCEL (pwritev, fd, vector, count, LO_HI_LONG (offset)); if (result >= 0 || errno != ENOSYS) return result; -# endif return __atomic_pwritev_replacement (fd, vector, count, offset); } # define PWRITEV static __atomic_pwritev_replacement diff --git a/sysdeps/unix/sysv/linux/pwritev64.c b/sysdeps/unix/sysv/linux/pwritev64.c index 9bb0399..08bda27 100644 --- a/sysdeps/unix/sysv/linux/pwritev64.c +++ b/sysdeps/unix/sysv/linux/pwritev64.c @@ -20,14 +20,10 @@ #ifdef __ASSUME_PWRITEV -# ifndef __NR_pwritev64 -# define __NR_pwritev64 __NR_pwritev -# endif - ssize_t pwritev64 (int fd, const struct iovec *vector, int count, off64_t offset) { - return SYSCALL_CANCEL (pwritev64, fd, vector, count, LO_HI_LONG (offset)); + return SYSCALL_CANCEL (pwritev, fd, vector, count, LO_HI_LONG (offset)); } #else static ssize_t __atomic_pwritev64_replacement (int, const struct iovec *, @@ -35,12 +31,10 @@ static ssize_t __atomic_pwritev64_replacement (int, const struct iovec *, ssize_t pwritev64 (int fd, const struct iovec *vector, int count, off64_t offset) { -#ifdef __NR_pwritev64 - ssize_t result = SYSCALL_CANCEL (pwritev64, fd, vector, count, + ssize_t result = SYSCALL_CANCEL (pwritev, fd, vector, count, LO_HI_LONG (offset)); if (result >= 0 || errno != ENOSYS) return result; -#endif return __atomic_pwritev64_replacement (fd, vector, count, offset); } # define PWRITEV static __atomic_pwritev64_replacement
reply other threads:[~2020-02-09 16:56 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200209165637.28207.qmail@sourceware.org \ --to=fw@sourceware.org \ --cc=glibc-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).