1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00
* sysdeps/unix/sysv/linux/i386/pread64.c: Removed, we can use the
	normal version now.
	* sysdeps/unix/sysv/linux/arm/pread64.c: Likewise.
	* sysdeps/unix/sysv/linux/arm/pwrite64.c: Likewise.
	* sysdeps/unix/sysv/linux/mips/pread64.c: Likewise.
	* sysdeps/unix/sysv/linux/mips/pwrite64.c: Likewise.

	* sysdeps/unix/sysv/linux/pwrite64.c (__libc_pwrite64): Check
	endianness to check how to pass argument.
	* sysdeps/unix/sysv/linux/pread64.c (__libc_pread64): Likewise.
This commit is contained in:
Andreas Jaeger
2000-05-26 15:46:14 +00:00
parent dc95d15887
commit 088b991767
8 changed files with 30 additions and 221 deletions

View File

@ -18,6 +18,7 @@
Boston, MA 02111-1307, USA. */
#include <errno.h>
#include <endian.h>
#include <unistd.h>
#include <sysdep.h>
@ -46,8 +47,15 @@ __libc_pwrite64 (fd, buf, count, offset)
ssize_t result;
/* First try the syscall. */
result = INLINE_SYSCALL (pwrite, 5, fd, buf, count, (off_t) (offset >> 32),
# if __BYTE_ORDER == __LITTLE_ENDIAN
result = INLINE_SYSCALL (pwrite, 5, fd, buf, count,
(off_t) (offset & 0xffffffff),
(off_t) (offset >> 32));
# elif __BYTE_ORDER == __BIG_ENDIAN
result = INLINE_SYSCALL (pwrite, 5, fd, buf, count,
(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. */