diff options
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/unix/sysv/linux/preadv.c | 5 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/preadv64.c | 5 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/pwritev.c | 5 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/pwritev64.c | 7 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sysdep.h | 9 |
5 files changed, 18 insertions, 13 deletions
diff --git a/sysdeps/unix/sysv/linux/preadv.c b/sysdeps/unix/sysv/linux/preadv.c index f6958c30ca..be206e277b 100644 --- a/sysdeps/unix/sysv/linux/preadv.c +++ b/sysdeps/unix/sysv/linux/preadv.c @@ -29,8 +29,7 @@ ssize_t preadv (int fd, const struct iovec *vector, int count, off_t offset) { - return SYSCALL_CANCEL (preadv, fd, vector, count, - __ALIGNMENT_ARG SYSCALL_LL (offset)); + return SYSCALL_CANCEL (preadv, fd, vector, count, LO_HI_LONG (offset)); } # else static ssize_t __atomic_preadv_replacement (int, const struct iovec *, @@ -40,7 +39,7 @@ preadv (int fd, const struct iovec *vector, int count, off_t offset) { # ifdef __NR_preadv ssize_t result = SYSCALL_CANCEL (preadv, fd, vector, count, - __ALIGNMENT_ARG SYSCALL_LL (offset)); + LO_HI_LONG (offset)); if (result >= 0 || errno != ENOSYS) return result; # endif diff --git a/sysdeps/unix/sysv/linux/preadv64.c b/sysdeps/unix/sysv/linux/preadv64.c index 18f55508ad..64164bbe6b 100644 --- a/sysdeps/unix/sysv/linux/preadv64.c +++ b/sysdeps/unix/sysv/linux/preadv64.c @@ -27,8 +27,7 @@ ssize_t preadv64 (int fd, const struct iovec *vector, int count, off64_t offset) { - return SYSCALL_CANCEL (preadv64, fd, vector, count, - __ALIGNMENT_ARG SYSCALL_LL64 (offset)); + return SYSCALL_CANCEL (preadv64, fd, vector, count, LO_HI_LONG (offset)); } #else static ssize_t __atomic_preadv64_replacement (int, const struct iovec *, @@ -38,7 +37,7 @@ preadv64 (int fd, const struct iovec *vector, int count, off64_t offset) { #ifdef __NR_preadv64 ssize_t result = SYSCALL_CANCEL (preadv64, fd, vector, count, - __ALIGNMENT_ARG SYSCALL_LL64 (offset)); + LO_HI_LONG (offset)); if (result >= 0 || errno != ENOSYS) return result; #endif diff --git a/sysdeps/unix/sysv/linux/pwritev.c b/sysdeps/unix/sysv/linux/pwritev.c index b11606cfaf..19b4a109a9 100644 --- a/sysdeps/unix/sysv/linux/pwritev.c +++ b/sysdeps/unix/sysv/linux/pwritev.c @@ -29,8 +29,7 @@ ssize_t pwritev (int fd, const struct iovec *vector, int count, off_t offset) { - return SYSCALL_CANCEL (pwritev, fd, vector, count, - __ALIGNMENT_ARG SYSCALL_LL (offset)); + return SYSCALL_CANCEL (pwritev, fd, vector, count, LO_HI_LONG (offset)); } # else static ssize_t __atomic_pwritev_replacement (int, const struct iovec *, @@ -40,7 +39,7 @@ pwritev (int fd, const struct iovec *vector, int count, off_t offset) { # ifdef __NR_pwritev ssize_t result = SYSCALL_CANCEL (pwritev, fd, vector, count, - __ALIGNMENT_ARG SYSCALL_LL (offset)); + LO_HI_LONG (offset)); if (result >= 0 || errno != ENOSYS) return result; # endif diff --git a/sysdeps/unix/sysv/linux/pwritev64.c b/sysdeps/unix/sysv/linux/pwritev64.c index bed79b7aad..c0cfe4b413 100644 --- a/sysdeps/unix/sysv/linux/pwritev64.c +++ b/sysdeps/unix/sysv/linux/pwritev64.c @@ -27,8 +27,7 @@ ssize_t pwritev64 (int fd, const struct iovec *vector, int count, off64_t offset) { - return SYSCALL_CANCEL (pwritev64, fd, vector, count, - __ALIGNMENT_ARG SYSCALL_LL64 (offset)); + return SYSCALL_CANCEL (pwritev64, fd, vector, count, LO_HI_LONG (offset)); } #else static ssize_t __atomic_pwritev64_replacement (int, const struct iovec *, @@ -36,9 +35,9 @@ 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_pwrite64v +#ifdef __NR_pwritev64 ssize_t result = SYSCALL_CANCEL (pwritev64, fd, vector, count, - __ALIGNMENT_ARG SYSCALL_LL64 (offset)); + LO_HI_LONG (offset)); if (result >= 0 || errno != ENOSYS) return result; #endif diff --git a/sysdeps/unix/sysv/linux/sysdep.h b/sysdeps/unix/sysv/linux/sysdep.h index f2d7e05975..8c9e62efb0 100644 --- a/sysdeps/unix/sysv/linux/sysdep.h +++ b/sysdeps/unix/sysv/linux/sysdep.h @@ -47,3 +47,12 @@ #define SYSCALL_LL64(val) \ __LONG_LONG_PAIR ((long) ((val) >> 32), (long) ((val) & 0xffffffff)) #endif + +/* Provide a macro to pass the off{64}_t argument on p{readv,writev}{64}. */ +#if __WORDSIZE == 64 || defined __ASSUME_WORDSIZE64_ILP32 +# define LO_HI_LONG(val) (val) +#else +# define LO_HI_LONG(val) \ + (long) (val), \ + (long) (((uint64_t) (val)) >> 32) +#endif |