From patchwork Sun Feb 9 20:20:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 37814 X-Patchwork-Delegate: carlos@redhat.com Received: (qmail 20885 invoked by alias); 9 Feb 2020 20:20:28 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 20817 invoked by uid 89); 9 Feb 2020 20:20:28 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-17.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, UNSUBSCRIBE_BODY autolearn=ham version=3.3.1 spammy=Newer X-HELO: us-smtp-delivery-1.mimecast.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581279624; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5ZmBH3Lsq/40uOaays8ktrUM2aOMyJyF9K0CIN/xbuk=; b=FO2xNyFHcT8o7+JYZkc2lWD8R0hQho/H24NNoq68TZfO81JtTExCyzwasy0uB8eueQDVcs epUDdsTamvVa3qkfd+M1amwHCY8rZhIFIS8tj/j6CPrnprb4bnnID8vhBFFvuEV0yAqY7v CwxtkpAeQKzXhfWt0rh8iwp7wox/0Xg= From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH 10/26] Linux: Clean up pread64/pwrite64 system call names In-Reply-To: References: X-From-Line: 401c63072f7c81105a349fbf4023deb06aab1b15 Mon Sep 17 00:00:00 2001 Message-Id: <401c63072f7c81105a349fbf4023deb06aab1b15.1581279333.git.fweimer@redhat.com> Date: Sun, 09 Feb 2020 21:20:18 +0100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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. Reviewed-by: Adhemerval Zanella --- 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 23defce7c3..40b4b955ca 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 7a09affd34..8dd87b3976 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 a7f907186b..3d4ffbafc1 100644 --- a/sysdeps/unix/sysv/linux/pread64.c +++ b/sysdeps/unix/sysv/linux/pread64.c @@ -19,10 +19,6 @@ #include #include -#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 2eb6873e66..af33985959 100644 --- a/sysdeps/unix/sysv/linux/pread64_nocancel.c +++ b/sysdeps/unix/sysv/linux/pread64_nocancel.c @@ -20,10 +20,6 @@ #include #include -#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 5ef208e885..17964686e5 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 632f001f5b..709775c207 100644 --- a/sysdeps/unix/sysv/linux/pwrite64.c +++ b/sysdeps/unix/sysv/linux/pwrite64.c @@ -19,10 +19,6 @@ #include #include -#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 9ff4479dc3..cec1326662 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