diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/mips/pread64.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/mips/pread64.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/mips/pread64.c b/sysdeps/unix/sysv/linux/mips/pread64.c index 36ec100fb3..12c9cc0ba1 100644 --- a/sysdeps/unix/sysv/linux/mips/pread64.c +++ b/sysdeps/unix/sysv/linux/mips/pread64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. @@ -42,7 +42,13 @@ static ssize_t __emulate_pread64 (int fd, void *buf, size_t count, # 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,9 +65,14 @@ __libc_pread64 (fd, buf, count, offset) if (SINGLE_THREAD_P) { /* First try the syscall. */ +#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 ((off_t) (offset >> 32), (off_t) (offset & 0xffffffff))); +#endif # if __ASSUME_PREAD_SYSCALL == 0 if (result == -1 && errno == ENOSYS) /* No system call available. Use the emulation. */ @@ -73,9 +84,14 @@ __libc_pread64 (fd, buf, count, offset) int oldtype = LIBC_CANCEL_ASYNC (); /* First try the syscall. */ +#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 ((off_t) (offset >> 32), (off_t) (offset & 0xffffffff))); +#endif # if __ASSUME_PREAD_SYSCALL == 0 if (result == -1 && errno == ENOSYS) /* No system call available. Use the emulation. */ |