From 4b5e1c5f0ef986ccf8a67ed44d701dc18f7d7a44 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Thu, 20 Mar 2003 20:58:02 +0000 Subject: * sysdeps/unix/sysv/linux/mips/pread.c: Don't break up offset into high and low halves on n64. * sysdeps/unix/sysv/linux/mips/pread64.c: Likewise. * sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise. * sysdeps/unix/sysv/linux/mips/pwrite64.c: Likewise. 2003-03-20 Alexandre Oliva * sysdeps/unix/sysv/linux/mips/pread.c: Don't break up offset into high and low halves on n64. * sysdeps/unix/sysv/linux/mips/pread64.c: Likewise. * sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise. * sysdeps/unix/sysv/linux/mips/pwrite64.c: Likewise. --- sysdeps/unix/sysv/linux/mips/pread.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'sysdeps/unix/sysv/linux/mips/pread.c') diff --git a/sysdeps/unix/sysv/linux/mips/pread.c b/sysdeps/unix/sysv/linux/mips/pread.c index e6cb21ff93..dc278d4401 100644 --- a/sysdeps/unix/sysv/linux/mips/pread.c +++ b/sysdeps/unix/sysv/linux/mips/pread.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. @@ -42,7 +42,13 @@ static ssize_t __emulate_pread (int fd, void *buf, size_t count, off_t offset) internal_function; # endif extern ssize_t __syscall_pread (int fd, void *__unbounded buf, size_t count, - int dummy, off_t offset_hi, off_t offset_lo); + int dummy, +#if defined _ABI64 && _MIPS_SIM == _ABI64 + off_t offset +#else + off_t offset_hi, off_t offset_lo +#endif + ); @@ -59,8 +65,13 @@ __libc_pread (fd, buf, count, offset) { /* First try the syscall. */ assert (sizeof (offset) == 4); +#if defined _ABI64 && _MIPS_SIM == _ABI64 + result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, + offset); +#else result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, __LONG_LONG_PAIR (offset >> 31, offset)); +#endif # if __ASSUME_PREAD_SYSCALL == 0 if (result == -1 && errno == ENOSYS) /* No system call available. Use the emulation. */ @@ -73,8 +84,13 @@ __libc_pread (fd, buf, count, offset) /* First try the syscall. */ assert (sizeof (offset) == 4); +#if defined _ABI64 && _MIPS_SIM == _ABI64 + result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, + offset); +#else result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, __LONG_LONG_PAIR (offset >> 31, offset)); +#endif # if __ASSUME_PREAD_SYSCALL == 0 if (result == -1 && errno == ENOSYS) /* No system call available. Use the emulation. */ -- cgit 1.4.1