summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/mips/ftruncate64.c
diff options
context:
space:
mode:
authorGreg McGary <greg@mcgary.org>2000-07-06 23:42:33 +0000
committerGreg McGary <greg@mcgary.org>2000-07-06 23:42:33 +0000
commitca1cde9e3eeffca1fab21102cb5c4b56257dcf83 (patch)
tree6486088a4704f004d747068cd63d882118b255c4 /sysdeps/unix/sysv/linux/mips/ftruncate64.c
parentcf90163d418e0cf83166e85735ba81a3cd28ed32 (diff)
* string/endian.h (__LONG_LONG_PAIR): New macro.
* sysdeps/unix/sysv/linux/ftruncate64.c: Use it. * sysdeps/unix/sysv/linux/pread.c: Likewise. * sysdeps/unix/sysv/linux/pread64.c: Likewise. * sysdeps/unix/sysv/linux/pwrite.c: Likewise. * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. * sysdeps/unix/sysv/linux/truncate64.c: Likewise. * sysdeps/unix/sysv/linux/mips/ftruncate64.c: Likewise. * sysdeps/unix/sysv/linux/mips/pread.c: Likewise. * sysdeps/unix/sysv/linux/mips/pread64.c: Likewise. * sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise. * sysdeps/unix/sysv/linux/mips/pwrite64.c: Likewise. * sysdeps/unix/sysv/linux/mips/truncate64.c: Likewise. * string/endian.h (__LONG_LONG_PAIR): New macro. * sysdeps/unix/sysv/linux/ftruncate64.c: Use it. * sysdeps/unix/sysv/linux/pread.c: Likewise. * sysdeps/unix/sysv/linux/pread64.c: Likewise. * sysdeps/unix/sysv/linux/pwrite.c: Likewise. * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. * sysdeps/unix/sysv/linux/truncate64.c: Likewise. * sysdeps/unix/sysv/linux/mips/ftruncate64.c: Likewise. * sysdeps/unix/sysv/linux/mips/pread.c: Likewise. * sysdeps/unix/sysv/linux/mips/pread64.c: Likewise. * sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise. * sysdeps/unix/sysv/linux/mips/pwrite64.c: Likewise. * sysdeps/unix/sysv/linux/mips/truncate64.c: Likewise.
Diffstat (limited to 'sysdeps/unix/sysv/linux/mips/ftruncate64.c')
-rw-r--r--sysdeps/unix/sysv/linux/mips/ftruncate64.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sysdeps/unix/sysv/linux/mips/ftruncate64.c b/sysdeps/unix/sysv/linux/mips/ftruncate64.c
index 768946e9fa..e45afbad7d 100644
--- a/sysdeps/unix/sysv/linux/mips/ftruncate64.c
+++ b/sysdeps/unix/sysv/linux/mips/ftruncate64.c
@@ -50,13 +50,8 @@ ftruncate64 (int fd, off64_t length)
#ifndef __ASSUME_TRUNCATE64_SYSCALL
int saved_errno = errno;
#endif
-#if __BYTE_ORDER == __LITTLE_ENDIAN
- /* Use a fill argument to pass low, high in an aligned pair of
- arguments (here 2/3). */
- int result = INLINE_SYSCALL (ftruncate64, 3, fd, 0, low, high);
-#elif __BYTE_ORDER == __BIG_ENDIAN
- int result = INLINE_SYSCALL (ftruncate64, 3, fd, 0, high, low);
-#endif
+ int result = INLINE_SYSCALL (ftruncate64, 3, fd, 0,
+ __LONG_LONG_PAIR (high, low));
#ifndef __ASSUME_TRUNCATE64_SYSCALL
if (result != -1 || errno != ENOSYS)
#endif