1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00
2002-07-17  Andreas Schwab  <schwab@suse.de>
	    Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/unix/sysv/linux/pread.c: Sign extend offset.
	* sysdeps/unix/sysv/linux/pwrite.c: Likewise.
	* sysdeps/unix/sysv/linux/mips/pread.c: Likewise.
	* sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise.
This commit is contained in:
Ulrich Drepper
2002-07-17 20:44:55 +00:00
parent 11fa51b8f6
commit cd682e15d9
5 changed files with 24 additions and 8 deletions

View File

@ -1,3 +1,11 @@
2002-07-17 Andreas Schwab <schwab@suse.de>
Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/pread.c: Sign extend offset.
* sysdeps/unix/sysv/linux/pwrite.c: Likewise.
* sysdeps/unix/sysv/linux/mips/pread.c: Likewise.
* sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise.
2002-07-01 H.J. Lu <hjl@gnu.org> 2002-07-01 H.J. Lu <hjl@gnu.org>
* elf/circleload1.c (load_dso): Call "circlemod1" and check * elf/circleload1.c (load_dso): Call "circlemod1" and check

View File

@ -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. This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@ -17,6 +17,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */ 02111-1307 USA. */
#include <assert.h>
#include <errno.h> #include <errno.h>
#include <unistd.h> #include <unistd.h>
#include <endian.h> #include <endian.h>
@ -48,8 +49,9 @@ __libc_pread (fd, buf, count, offset)
ssize_t result; ssize_t result;
/* First try the syscall. */ /* First try the syscall. */
assert (sizeof (offset) == 4);
result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0, result = INLINE_SYSCALL (pread, 6, fd, CHECK_N (buf, count), count, 0,
__LONG_LONG_PAIR (0, offset)); __LONG_LONG_PAIR (offset >> 31, offset));
# if __ASSUME_PREAD_SYSCALL == 0 # if __ASSUME_PREAD_SYSCALL == 0
if (result == -1 && errno == ENOSYS) if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */ /* No system call available. Use the emulation. */

View File

@ -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. This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@ -17,6 +17,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */ 02111-1307 USA. */
#include <assert.h>
#include <errno.h> #include <errno.h>
#include <unistd.h> #include <unistd.h>
#include <endian.h> #include <endian.h>
@ -47,8 +48,9 @@ __libc_pwrite (fd, buf, count, offset)
ssize_t result; ssize_t result;
/* First try the syscall. */ /* First try the syscall. */
assert (sizeof (offset) == 4);
result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0, result = INLINE_SYSCALL (pwrite, 6, fd, CHECK_N (buf, count), count, 0,
__LONG_LONG_PAIR (0, offset)); __LONG_LONG_PAIR (offset >> 31, offset));
# if __ASSUME_PWRITE_SYSCALL == 0 # if __ASSUME_PWRITE_SYSCALL == 0
if (result == -1 && errno == ENOSYS) if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */ /* No system call available. Use the emulation. */

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. /* Copyright (C) 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@ -17,6 +17,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */ 02111-1307 USA. */
#include <assert.h>
#include <errno.h> #include <errno.h>
#include <endian.h> #include <endian.h>
#include <unistd.h> #include <unistd.h>
@ -49,8 +50,9 @@ __libc_pread (fd, buf, count, offset)
ssize_t result; ssize_t result;
/* First try the syscall. */ /* First try the syscall. */
assert (sizeof (offset) == 4);
result = INLINE_SYSCALL (pread, 5, fd, CHECK_N (buf, count), count, result = INLINE_SYSCALL (pread, 5, fd, CHECK_N (buf, count), count,
__LONG_LONG_PAIR (0, offset)); __LONG_LONG_PAIR (offset >> 31, offset));
# if __ASSUME_PREAD_SYSCALL == 0 # if __ASSUME_PREAD_SYSCALL == 0
if (result == -1 && errno == ENOSYS) if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */ /* No system call available. Use the emulation. */

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc. /* Copyright (C) 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@ -17,6 +17,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */ 02111-1307 USA. */
#include <assert.h>
#include <errno.h> #include <errno.h>
#include <endian.h> #include <endian.h>
#include <unistd.h> #include <unistd.h>
@ -49,8 +50,9 @@ __libc_pwrite (fd, buf, count, offset)
ssize_t result; ssize_t result;
/* First try the syscall. */ /* First try the syscall. */
assert (sizeof (offset) == 4);
result = INLINE_SYSCALL (pwrite, 5, fd, CHECK_N (buf, count), count, result = INLINE_SYSCALL (pwrite, 5, fd, CHECK_N (buf, count), count,
__LONG_LONG_PAIR (0, offset)); __LONG_LONG_PAIR (offset >> 31, offset));
# if __ASSUME_PWRITE_SYSCALL == 0 # if __ASSUME_PWRITE_SYSCALL == 0
if (result == -1 && errno == ENOSYS) if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */ /* No system call available. Use the emulation. */