mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-05 19:35:52 +03:00
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. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
@@ -22,10 +22,6 @@
|
|||||||
|
|
||||||
# ifdef __ASSUME_PREADV
|
# ifdef __ASSUME_PREADV
|
||||||
|
|
||||||
# ifndef __NR_preadv
|
|
||||||
# define __NR_preadv __NR_preadv64
|
|
||||||
# endif
|
|
||||||
|
|
||||||
ssize_t
|
ssize_t
|
||||||
preadv (int fd, const struct iovec *vector, int count, off_t offset)
|
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
|
ssize_t
|
||||||
preadv (int fd, const struct iovec *vector, int count, off_t offset)
|
preadv (int fd, const struct iovec *vector, int count, off_t offset)
|
||||||
{
|
{
|
||||||
# ifdef __NR_preadv
|
|
||||||
ssize_t result = SYSCALL_CANCEL (preadv, fd, vector, count,
|
ssize_t result = SYSCALL_CANCEL (preadv, fd, vector, count,
|
||||||
LO_HI_LONG (offset));
|
LO_HI_LONG (offset));
|
||||||
if (result >= 0 || errno != ENOSYS)
|
if (result >= 0 || errno != ENOSYS)
|
||||||
return result;
|
return result;
|
||||||
# endif
|
|
||||||
return __atomic_preadv_replacement (fd, vector, count, offset);
|
return __atomic_preadv_replacement (fd, vector, count, offset);
|
||||||
}
|
}
|
||||||
# define PREADV static __atomic_preadv_replacement
|
# define PREADV static __atomic_preadv_replacement
|
||||||
|
@@ -20,14 +20,10 @@
|
|||||||
|
|
||||||
#ifdef __ASSUME_PREADV
|
#ifdef __ASSUME_PREADV
|
||||||
|
|
||||||
# ifndef __NR_preadv64
|
|
||||||
# define __NR_preadv64 __NR_preadv
|
|
||||||
# endif
|
|
||||||
|
|
||||||
ssize_t
|
ssize_t
|
||||||
preadv64 (int fd, const struct iovec *vector, int count, off64_t offset)
|
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
|
#else
|
||||||
static ssize_t __atomic_preadv64_replacement (int, const struct iovec *,
|
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
|
ssize_t
|
||||||
preadv64 (int fd, const struct iovec *vector, int count, off64_t offset)
|
preadv64 (int fd, const struct iovec *vector, int count, off64_t offset)
|
||||||
{
|
{
|
||||||
#ifdef __NR_preadv64
|
ssize_t result = SYSCALL_CANCEL (preadv, fd, vector, count,
|
||||||
ssize_t result = SYSCALL_CANCEL (preadv64, fd, vector, count,
|
|
||||||
LO_HI_LONG (offset));
|
LO_HI_LONG (offset));
|
||||||
if (result >= 0 || errno != ENOSYS)
|
if (result >= 0 || errno != ENOSYS)
|
||||||
return result;
|
return result;
|
||||||
#endif
|
|
||||||
return __atomic_preadv64_replacement (fd, vector, count, offset);
|
return __atomic_preadv64_replacement (fd, vector, count, offset);
|
||||||
}
|
}
|
||||||
# define PREADV static __atomic_preadv64_replacement
|
# define PREADV static __atomic_preadv64_replacement
|
||||||
|
@@ -22,10 +22,6 @@
|
|||||||
|
|
||||||
# ifdef __ASSUME_PREADV
|
# ifdef __ASSUME_PREADV
|
||||||
|
|
||||||
# ifndef __NR_pwritev
|
|
||||||
# define __NR_pwritev __NR_pwritev64
|
|
||||||
# endif
|
|
||||||
|
|
||||||
ssize_t
|
ssize_t
|
||||||
pwritev (int fd, const struct iovec *vector, int count, off_t offset)
|
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
|
ssize_t
|
||||||
pwritev (int fd, const struct iovec *vector, int count, off_t offset)
|
pwritev (int fd, const struct iovec *vector, int count, off_t offset)
|
||||||
{
|
{
|
||||||
# ifdef __NR_pwritev
|
|
||||||
ssize_t result = SYSCALL_CANCEL (pwritev, fd, vector, count,
|
ssize_t result = SYSCALL_CANCEL (pwritev, fd, vector, count,
|
||||||
LO_HI_LONG (offset));
|
LO_HI_LONG (offset));
|
||||||
if (result >= 0 || errno != ENOSYS)
|
if (result >= 0 || errno != ENOSYS)
|
||||||
return result;
|
return result;
|
||||||
# endif
|
|
||||||
return __atomic_pwritev_replacement (fd, vector, count, offset);
|
return __atomic_pwritev_replacement (fd, vector, count, offset);
|
||||||
}
|
}
|
||||||
# define PWRITEV static __atomic_pwritev_replacement
|
# define PWRITEV static __atomic_pwritev_replacement
|
||||||
|
@@ -20,14 +20,10 @@
|
|||||||
|
|
||||||
#ifdef __ASSUME_PWRITEV
|
#ifdef __ASSUME_PWRITEV
|
||||||
|
|
||||||
# ifndef __NR_pwritev64
|
|
||||||
# define __NR_pwritev64 __NR_pwritev
|
|
||||||
# endif
|
|
||||||
|
|
||||||
ssize_t
|
ssize_t
|
||||||
pwritev64 (int fd, const struct iovec *vector, int count, off64_t offset)
|
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
|
#else
|
||||||
static ssize_t __atomic_pwritev64_replacement (int, const struct iovec *,
|
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
|
ssize_t
|
||||||
pwritev64 (int fd, const struct iovec *vector, int count, off64_t offset)
|
pwritev64 (int fd, const struct iovec *vector, int count, off64_t offset)
|
||||||
{
|
{
|
||||||
#ifdef __NR_pwritev64
|
ssize_t result = SYSCALL_CANCEL (pwritev, fd, vector, count,
|
||||||
ssize_t result = SYSCALL_CANCEL (pwritev64, fd, vector, count,
|
|
||||||
LO_HI_LONG (offset));
|
LO_HI_LONG (offset));
|
||||||
if (result >= 0 || errno != ENOSYS)
|
if (result >= 0 || errno != ENOSYS)
|
||||||
return result;
|
return result;
|
||||||
#endif
|
|
||||||
return __atomic_pwritev64_replacement (fd, vector, count, offset);
|
return __atomic_pwritev64_replacement (fd, vector, count, offset);
|
||||||
}
|
}
|
||||||
# define PWRITEV static __atomic_pwritev64_replacement
|
# define PWRITEV static __atomic_pwritev64_replacement
|
||||||
|
Reference in New Issue
Block a user