mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
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. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
@ -25,11 +25,3 @@
|
|||||||
#ifdef __NR_llseek
|
#ifdef __NR_llseek
|
||||||
# define __NR__llseek __NR_llseek
|
# define __NR__llseek __NR_llseek
|
||||||
#endif
|
#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
|
|
||||||
|
@ -21,14 +21,10 @@
|
|||||||
|
|
||||||
#ifndef __OFF_T_MATCHES_OFF64_T
|
#ifndef __OFF_T_MATCHES_OFF64_T
|
||||||
|
|
||||||
# ifndef __NR_pread
|
|
||||||
# define __NR_pread __NR_pread64
|
|
||||||
# endif
|
|
||||||
|
|
||||||
ssize_t
|
ssize_t
|
||||||
__libc_pread (int fd, void *buf, size_t count, off_t offset)
|
__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)
|
strong_alias (__libc_pread, __pread)
|
||||||
|
@ -19,10 +19,6 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sysdep-cancel.h>
|
#include <sysdep-cancel.h>
|
||||||
|
|
||||||
#ifndef __NR_pread64
|
|
||||||
# define __NR_pread64 __NR_pread
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ssize_t
|
ssize_t
|
||||||
__libc_pread64 (int fd, void *buf, size_t count, off64_t offset)
|
__libc_pread64 (int fd, void *buf, size_t count, off64_t offset)
|
||||||
{
|
{
|
||||||
|
@ -20,10 +20,6 @@
|
|||||||
#include <sysdep-cancel.h>
|
#include <sysdep-cancel.h>
|
||||||
#include <not-cancel.h>
|
#include <not-cancel.h>
|
||||||
|
|
||||||
#ifndef __NR_pread64
|
|
||||||
# define __NR_pread64 __NR_pread
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ssize_t
|
ssize_t
|
||||||
__pread64_nocancel (int fd, void *buf, size_t count, off64_t offset)
|
__pread64_nocancel (int fd, void *buf, size_t count, off64_t offset)
|
||||||
{
|
{
|
||||||
|
@ -21,14 +21,10 @@
|
|||||||
|
|
||||||
#ifndef __OFF_T_MATCHES_OFF64_T
|
#ifndef __OFF_T_MATCHES_OFF64_T
|
||||||
|
|
||||||
# ifndef __NR_pwrite
|
|
||||||
# define __NR_pwrite __NR_pwrite64
|
|
||||||
# endif
|
|
||||||
|
|
||||||
ssize_t
|
ssize_t
|
||||||
__libc_pwrite (int fd, const void *buf, size_t count, off_t offset)
|
__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)
|
strong_alias (__libc_pwrite, __pwrite)
|
||||||
|
@ -19,10 +19,6 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sysdep-cancel.h>
|
#include <sysdep-cancel.h>
|
||||||
|
|
||||||
#ifndef __NR_pwrite64
|
|
||||||
# define __NR_pwrite64 __NR_pwrite
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ssize_t
|
ssize_t
|
||||||
__libc_pwrite64 (int fd, const void *buf, size_t count, off64_t offset)
|
__libc_pwrite64 (int fd, const void *buf, size_t count, off64_t offset)
|
||||||
{
|
{
|
||||||
|
@ -34,16 +34,8 @@
|
|||||||
/* In newer 2.1 kernels __NR_syscall is missing so we define it here. */
|
/* In newer 2.1 kernels __NR_syscall is missing so we define it here. */
|
||||||
#define __NR_syscall 0
|
#define __NR_syscall 0
|
||||||
|
|
||||||
/*
|
#undef SYS_ify
|
||||||
* Newer kernel versions redefined __NR_pread and __NR_pwrite to
|
#define SYS_ify(syscall_name) __NR_##syscall_name
|
||||||
* __NR_pread64 and __NR_pwrite64.
|
|
||||||
*/
|
|
||||||
#ifndef __NR_pread
|
|
||||||
# define __NR_pread __NR_pread64
|
|
||||||
#endif
|
|
||||||
#ifndef __NR_pwrite
|
|
||||||
# define __NR_pwrite __NR_pwrite64
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __ASSEMBLER__
|
#ifdef __ASSEMBLER__
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user