about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2003-03-20 20:58:02 +0000
committerAlexandre Oliva <aoliva@redhat.com>2003-03-20 20:58:02 +0000
commit4b5e1c5f0ef986ccf8a67ed44d701dc18f7d7a44 (patch)
treee66dc15c14e2988554edffbce0d95ee6f7f667cd
parent6848aba6c3bf14ba5ed39a6edb1187c831d19fff (diff)
downloadglibc-4b5e1c5f0ef986ccf8a67ed44d701dc18f7d7a44.tar.gz
glibc-4b5e1c5f0ef986ccf8a67ed44d701dc18f7d7a44.tar.xz
glibc-4b5e1c5f0ef986ccf8a67ed44d701dc18f7d7a44.zip
* 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  <aoliva@redhat.com>

	* 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.
-rw-r--r--ChangeLog8
-rw-r--r--sysdeps/unix/sysv/linux/mips/pread.c20
-rw-r--r--sysdeps/unix/sysv/linux/mips/pread64.c20
-rw-r--r--sysdeps/unix/sysv/linux/mips/pwrite.c24
-rw-r--r--sysdeps/unix/sysv/linux/mips/pwrite64.c20
5 files changed, 82 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 137126d5bf..6121a0326b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2003-03-20  Alexandre Oliva  <aoliva@redhat.com>
+
+	* 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  Ulrich Drepper  <drepper@redhat.com>
 
 	* include/atomic.h (atomic_decrement_if_positive): Adjust for the
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 <drepper@cygnus.com>, 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.  */
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.  */
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite.c b/sysdeps/unix/sysv/linux/mips/pwrite.c
index f25e327877..1778d077ed 100644
--- a/sysdeps/unix/sysv/linux/mips/pwrite.c
+++ b/sysdeps/unix/sysv/linux/mips/pwrite.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 <drepper@cygnus.com>, 1997.
 
@@ -38,7 +38,13 @@
 #if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0
 
 extern ssize_t __syscall_pwrite (int fd, const 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
+				 );
 
 # if __ASSUME_PWRITE_SYSCALL == 0
 static ssize_t __emulate_pwrite (int fd, const void *buf, size_t count,
@@ -58,8 +64,13 @@ __libc_pwrite (fd, buf, count, offset)
     {
       /* First try the syscall.  */
      assert (sizeof (offset) == 4);
+#if defined _ABI64 && _MIPS_SIM == _ABI64
      result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
-			   __LONG_LONG_PAIR (offset >> 31, offset));
+			      offset);
+#else
+     result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
+			      __LONG_LONG_PAIR (offset >> 31, offset));
+#endif
 # if __ASSUME_PWRITE_SYSCALL == 0
      if (result == -1 && errno == ENOSYS)
        /* No system call available.  Use the emulation.  */
@@ -73,8 +84,13 @@ __libc_pwrite (fd, buf, count, offset)
 
   /* First try the syscall.  */
   assert (sizeof (offset) == 4);
+#if defined _ABI64 && _MIPS_SIM == _ABI64
   result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
-		   __LONG_LONG_PAIR (offset >> 31, offset));
+			   offset);
+#else
+  result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
+			   __LONG_LONG_PAIR (offset >> 31, offset));
+#endif
 # if __ASSUME_PWRITE_SYSCALL == 0
   if (result == -1 && errno == ENOSYS)
     /* No system call available.  Use the emulation.  */
diff --git a/sysdeps/unix/sysv/linux/mips/pwrite64.c b/sysdeps/unix/sysv/linux/mips/pwrite64.c
index 0accc1d37b..e43a378467 100644
--- a/sysdeps/unix/sysv/linux/mips/pwrite64.c
+++ b/sysdeps/unix/sysv/linux/mips/pwrite64.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 Ralf Baechle <ralf@gnu.org>, 1998.
 
@@ -37,7 +37,13 @@
 #if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0
 
 extern ssize_t __syscall_pwrite (int fd, const 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
+				 );
 
 # if __ASSUME_PWRITE_SYSCALL == 0
 static ssize_t __emulate_pwrite64 (int fd, const void *buf, size_t count,
@@ -56,9 +62,14 @@ __libc_pwrite64 (fd, buf, count, offset)
   if (SINGLE_THREAD_P)
     {
      /* First try the syscall.  */
+#if defined _ABI64 && _MIPS_SIM == _ABI64
+      result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
+			       offset);
+#else
      result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
 			      __LONG_LONG_PAIR ((off_t) (offset >> 32),
 			     (off_t) (offset & 0xffffffff)));
+#endif
 # if __ASSUME_PWRITE_SYSCALL == 0
      if (result == -1 && errno == ENOSYS)
      /* No system call available.  Use the emulation.  */
@@ -71,9 +82,14 @@ __libc_pwrite64 (fd, buf, count, offset)
   int oldtype = LIBC_CANCEL_ASYNC ();
 
   /* First try the syscall.  */
+#if defined _ABI64 && _MIPS_SIM == _ABI64
+  result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
+			   offset);
+#else
   result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
 			   __LONG_LONG_PAIR ((off_t) (offset >> 32),
 					     (off_t) (offset & 0xffffffff)));
+#endif
 # if __ASSUME_PWRITE_SYSCALL == 0
   if (result == -1 && errno == ENOSYS)
     /* No system call available.  Use the emulation.  */