1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00
2002-11-05  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>

	* sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: Handle
	__NR_pread64 and __NR_pwrite64.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/pread.c: Remove __NR_pread64
	and __NR_pwrite64.
	Revert change to use INLINE_SYSCALL.
	* sysdeps/unix/sysv/linux/powerpc/pread64.c: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/pwrite.c: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/pwrite64.c: Likewise.
	* sysdeps/unix/sysv/linux/powerpc/ftruncate64.c: Revert change to use
	INLINE_SYSCALL.
	* sysdeps/unix/sysv/linux/powerpc/truncate64.c: Likewise.

	* sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h (INLINE_SYSCALL):
	Update clobber list and add a comment about the syscall ABI.
This commit is contained in:
Ulrich Drepper
2002-11-05 19:58:06 +00:00
parent f6e50e66ad
commit 5bfed16d69
9 changed files with 66 additions and 35 deletions

View File

@ -24,13 +24,6 @@
#include <sys/syscall.h>
#include <bp-checks.h>
#ifdef __NR_pwrite64 /* Newer kernels renamed but it's the same. */
# ifdef __NR_pwrite
# error "__NR_pwrite and __NR_pwrite64 both defined???"
# endif
# define __NR_pwrite __NR_pwrite64
#endif
#ifdef __NR_pwrite
extern ssize_t __syscall_pwrite (int fd, const void *buf, size_t count,
@ -50,7 +43,7 @@ __libc_pwrite (fd, buf, count, offset)
ssize_t result;
/* First try the syscall. */
result = INLINE_SYSCALL (pwrite, 4, fd, CHECK_N (buf, count), count, offset);
result = __syscall_pwrite (fd, CHECK_N (buf, count), count, (off64_t) offset);
if (result == -1 && errno == ENOSYS)
/* No system call available. Use the emulation. */
result = __emulate_pwrite (fd, buf, count, offset);