1 --- uClibc/libc/sysdeps/linux/common/ftruncate64.c 17 Nov 2003 01:24:07 -0000 1.10
2 +++ uClibc/libc/sysdeps/linux/common/ftruncate64.c 21 Jul 2004 07:13:38 -0000
5 #if defined __NR_ftruncate64
7 -#if __WORDSIZE == 64 || (defined(__powerpc__) && defined (__UCLIBC_HAS_LFS__))
10 /* For a 64 bit machine, life is simple... */
11 _syscall2(int, ftruncate64, int, fd, __off64_t, length);
13 #ifndef INLINE_SYSCALL
14 #define INLINE_SYSCALL(name, nr, args...) __syscall_ftruncate64 (args)
15 #define __NR___syscall_ftruncate64 __NR_ftruncate64
16 +#if defined(__powerpc__) || defined(__mips__)
17 +static inline _syscall4(int, __syscall_ftruncate64, int, fd, int, pad, int, high_length, int, low_length);
19 static inline _syscall3(int, __syscall_ftruncate64, int, fd, int, high_length, int, low_length);
23 /* The exported ftruncate64 function. */
24 int ftruncate64 (int fd, __off64_t length)
26 uint32_t low = length & 0xffffffff;
27 uint32_t high = length >> 32;
28 - return INLINE_SYSCALL(ftruncate64, 3, fd, __LONG_LONG_PAIR (high, low));
29 + return INLINE_SYSCALL(ftruncate64,
30 +#if defined(__powerpc__) || defined(__mips__)
35 + __LONG_LONG_PAIR (high, low));
38 #else /* __WORDSIZE */
39 --- uClibc/libc/sysdeps/linux/common/truncate64.c 15 Nov 2002 14:06:44 -0000 1.8
40 +++ uClibc/libc/sysdeps/linux/common/truncate64.c 21 Jul 2004 07:13:38 -0000
42 #ifndef INLINE_SYSCALL
43 #define INLINE_SYSCALL(name, nr, args...) __syscall_truncate64 (args)
44 #define __NR___syscall_truncate64 __NR_truncate64
45 -static inline _syscall3(int, __syscall_truncate64, const char *, path, int, high_length, int, low_length);
46 +#if defined(__powerpc__) || defined(__mips__)
47 +static inline _syscall4(int, __syscall_truncate64, const char *, path,
48 + int, pad, int, high_length, int, low_length);
50 +static inline _syscall3(int, __syscall_truncate64, const char *, path,
51 + int, high_length, int, low_length);
58 uint32_t low = length & 0xffffffff;
59 uint32_t high = length >> 32;
60 - return INLINE_SYSCALL(truncate64, 3, path, __LONG_LONG_PAIR (high, low));
61 + return INLINE_SYSCALL(truncate64,
62 +#if defined(__powerpc__) || defined(__mips__)
67 + __LONG_LONG_PAIR (high, low));
69 #endif /* __UCLIBC_HAS_LFS__ */