update everything to the latest version
[openwrt.git] / obsolete-buildroot / sources / uClibc-ftruncate.patch
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
3 @@ -23,7 +23,7 @@
4
5 #if defined __NR_ftruncate64
6
7 -#if __WORDSIZE == 64 || (defined(__powerpc__) && defined (__UCLIBC_HAS_LFS__))
8 +#if __WORDSIZE == 64
9
10 /* For a 64 bit machine, life is simple... */
11 _syscall2(int, ftruncate64, int, fd, __off64_t, length);
12 @@ -33,15 +33,25 @@
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);
18 +#else
19 static inline _syscall3(int, __syscall_ftruncate64, int, fd, int, high_length, int, low_length);
20 #endif
21 +#endif
22
23 /* The exported ftruncate64 function. */
24 int ftruncate64 (int fd, __off64_t length)
25 {
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__)
31 + 4, fd, 0,
32 +#else
33 + 3, fd,
34 +#endif
35 + __LONG_LONG_PAIR (high, low));
36 }
37
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
41 @@ -33,7 +33,13 @@
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);
49 +#else
50 +static inline _syscall3(int, __syscall_truncate64, const char *, path,
51 + int, high_length, int, low_length);
52 +#endif
53 #endif
54
55
56 @@ -42,7 +48,13 @@
57 {
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__)
63 + 4, path, 0,
64 +#else
65 + 3, path,
66 +#endif
67 + __LONG_LONG_PAIR (high, low));
68 }
69 #endif /* __UCLIBC_HAS_LFS__ */
70
This page took 0.04727 seconds and 5 git commands to generate.