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 pread64/pwrite64 system call names Date: Sun, 09 Feb 2020 16:56:00 -0000 [thread overview] Message-ID: <20200209165627.27764.qmail@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=401c63072f7c81105a349fbf4023deb06aab1b15 commit 401c63072f7c81105a349fbf4023deb06aab1b15 Author: Florian Weimer <fweimer@redhat.com> Date: Sun Feb 9 16:07:00 2020 +0100 Linux: Clean up pread64/pwrite64 system call names Linux removed the last definitions of __NR_pread and __NR_pwrite in commit 4ba66a9760722ccbb691b8f7116cad2f791cca7b, the removal of the blackfin port. All architectures now define __NR_pread64 and __NR_pwrite64 only. Diff: --- sysdeps/unix/sysv/linux/generic/sysdep.h | 8 -------- sysdeps/unix/sysv/linux/pread.c | 6 +----- sysdeps/unix/sysv/linux/pread64.c | 4 ---- sysdeps/unix/sysv/linux/pread64_nocancel.c | 4 ---- sysdeps/unix/sysv/linux/pwrite.c | 6 +----- sysdeps/unix/sysv/linux/pwrite64.c | 4 ---- sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h | 11 ----------- 7 files changed, 2 insertions(+), 41 deletions(-) diff --git a/sysdeps/unix/sysv/linux/generic/sysdep.h b/sysdeps/unix/sysv/linux/generic/sysdep.h index 23defce..40b4b95 100644 --- a/sysdeps/unix/sysv/linux/generic/sysdep.h +++ b/sysdeps/unix/sysv/linux/generic/sysdep.h @@ -25,11 +25,3 @@ #ifdef __NR_llseek # define __NR__llseek __NR_llseek #endif - -#if __WORDSIZE == 64 -/* By defining the older names, glibc will build syscall wrappers for - both pread and pread64; sysdeps/unix/sysv/linux/wordsize-64/pread64.c - will suppress generating any separate code for pread64.c. */ -#define __NR_pread __NR_pread64 -#define __NR_pwrite __NR_pwrite64 -#endif diff --git a/sysdeps/unix/sysv/linux/pread.c b/sysdeps/unix/sysv/linux/pread.c index 7a09aff..8dd87b3 100644 --- a/sysdeps/unix/sysv/linux/pread.c +++ b/sysdeps/unix/sysv/linux/pread.c @@ -21,14 +21,10 @@ #ifndef __OFF_T_MATCHES_OFF64_T -# ifndef __NR_pread -# define __NR_pread __NR_pread64 -# endif - ssize_t __libc_pread (int fd, void *buf, size_t count, off_t offset) { - return SYSCALL_CANCEL (pread, fd, buf, count, SYSCALL_LL_PRW (offset)); + return SYSCALL_CANCEL (pread64, fd, buf, count, SYSCALL_LL_PRW (offset)); } strong_alias (__libc_pread, __pread) diff --git a/sysdeps/unix/sysv/linux/pread64.c b/sysdeps/unix/sysv/linux/pread64.c index a7f9071..3d4ffba 100644 --- a/sysdeps/unix/sysv/linux/pread64.c +++ b/sysdeps/unix/sysv/linux/pread64.c @@ -19,10 +19,6 @@ #include <unistd.h> #include <sysdep-cancel.h> -#ifndef __NR_pread64 -# define __NR_pread64 __NR_pread -#endif - ssize_t __libc_pread64 (int fd, void *buf, size_t count, off64_t offset) { diff --git a/sysdeps/unix/sysv/linux/pread64_nocancel.c b/sysdeps/unix/sysv/linux/pread64_nocancel.c index 2eb6873..af33985 100644 --- a/sysdeps/unix/sysv/linux/pread64_nocancel.c +++ b/sysdeps/unix/sysv/linux/pread64_nocancel.c @@ -20,10 +20,6 @@ #include <sysdep-cancel.h> #include <not-cancel.h> -#ifndef __NR_pread64 -# define __NR_pread64 __NR_pread -#endif - ssize_t __pread64_nocancel (int fd, void *buf, size_t count, off64_t offset) { diff --git a/sysdeps/unix/sysv/linux/pwrite.c b/sysdeps/unix/sysv/linux/pwrite.c index 5ef208e..1796468 100644 --- a/sysdeps/unix/sysv/linux/pwrite.c +++ b/sysdeps/unix/sysv/linux/pwrite.c @@ -21,14 +21,10 @@ #ifndef __OFF_T_MATCHES_OFF64_T -# ifndef __NR_pwrite -# define __NR_pwrite __NR_pwrite64 -# endif - ssize_t __libc_pwrite (int fd, const void *buf, size_t count, off_t offset) { - return SYSCALL_CANCEL (pwrite, fd, buf, count, SYSCALL_LL_PRW (offset)); + return SYSCALL_CANCEL (pwrite64, fd, buf, count, SYSCALL_LL_PRW (offset)); } strong_alias (__libc_pwrite, __pwrite) diff --git a/sysdeps/unix/sysv/linux/pwrite64.c b/sysdeps/unix/sysv/linux/pwrite64.c index 632f001..709775c 100644 --- a/sysdeps/unix/sysv/linux/pwrite64.c +++ b/sysdeps/unix/sysv/linux/pwrite64.c @@ -19,10 +19,6 @@ #include <unistd.h> #include <sysdep-cancel.h> -#ifndef __NR_pwrite64 -# define __NR_pwrite64 __NR_pwrite -#endif - ssize_t __libc_pwrite64 (int fd, const void *buf, size_t count, off64_t offset) { diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h index 9ff4479..cec1326 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h +++ b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h @@ -39,17 +39,6 @@ /* In newer 2.1 kernels __NR_syscall is missing so we define it here. */ #define __NR_syscall 0 -/* - * Newer kernel versions redefined __NR_pread and __NR_pwrite to - * __NR_pread64 and __NR_pwrite64. - */ -#ifndef __NR_pread -# define __NR_pread __NR_pread64 -#endif -#ifndef __NR_pwrite -# define __NR_pwrite __NR_pwrite64 -#endif - #undef SYS_ify #define SYS_ify(syscall_name) __NR_##syscall_name
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=20200209165627.27764.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).