From 088b991767b9a60cf36d7eb1d3b0db337ebf3a4e Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Fri, 26 May 2000 15:46:14 +0000 Subject: Update. * sysdeps/unix/sysv/linux/i386/pread64.c: Removed, we can use the normal version now. * sysdeps/unix/sysv/linux/arm/pread64.c: Likewise. * sysdeps/unix/sysv/linux/arm/pwrite64.c: Likewise. * sysdeps/unix/sysv/linux/mips/pread64.c: Likewise. * sysdeps/unix/sysv/linux/mips/pwrite64.c: Likewise. * sysdeps/unix/sysv/linux/pwrite64.c (__libc_pwrite64): Check endianness to check how to pass argument. * sysdeps/unix/sysv/linux/pread64.c (__libc_pread64): Likewise. --- sysdeps/unix/sysv/linux/pread64.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'sysdeps/unix/sysv/linux/pread64.c') diff --git a/sysdeps/unix/sysv/linux/pread64.c b/sysdeps/unix/sysv/linux/pread64.c index b7b5f019c8..628fd430fb 100644 --- a/sysdeps/unix/sysv/linux/pread64.c +++ b/sysdeps/unix/sysv/linux/pread64.c @@ -18,6 +18,7 @@ Boston, MA 02111-1307, USA. */ #include +#include #include #include @@ -46,8 +47,16 @@ __libc_pread64 (fd, buf, count, offset) ssize_t result; /* First try the syscall. */ - result = INLINE_SYSCALL (pread, 5, fd, buf, count, (off_t) (offset >> 32), +# if __BYTE_ORDER == __LITTLE_ENDIAN + result = INLINE_SYSCALL (pread, 5, fd, buf, count, + (off_t) (offset >> 32), (off_t) (offset & 0xffffffff)); +# elif __BYTE_ORDER == __BIG_ENDIAN + result = INLINE_SYSCALL (pread, 5, fd, buf, count, + (off_t) (offset & 0xffffffff), + (off_t) (offset >> 32)); +# endif + # if __ASSUME_PREAD_SYSCALL == 0 if (result == -1 && errno == ENOSYS) /* No system call available. Use the emulation. */ -- cgit v1.2.1