diff options
Diffstat (limited to 'include/linux/compat.h')
-rw-r--r-- | include/linux/compat.h | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h index 76a87fb57ac2..8c1dfc8d830d 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -27,12 +27,6 @@ | |||
27 | #define __SC_DELOUSE(t,v) ((t)(unsigned long)(v)) | 27 | #define __SC_DELOUSE(t,v) ((t)(unsigned long)(v)) |
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | #define __SC_CCAST1(t1, a1) __SC_DELOUSE(t1,a1) | ||
31 | #define __SC_CCAST2(t2, a2, ...) __SC_DELOUSE(t2,a2), __SC_CCAST1(__VA_ARGS__) | ||
32 | #define __SC_CCAST3(t3, a3, ...) __SC_DELOUSE(t3,a3), __SC_CCAST2(__VA_ARGS__) | ||
33 | #define __SC_CCAST4(t4, a4, ...) __SC_DELOUSE(t4,a4), __SC_CCAST3(__VA_ARGS__) | ||
34 | #define __SC_CCAST5(t5, a5, ...) __SC_DELOUSE(t5,a5), __SC_CCAST4(__VA_ARGS__) | ||
35 | #define __SC_CCAST6(t6, a6, ...) __SC_DELOUSE(t6,a6), __SC_CCAST5(__VA_ARGS__) | ||
36 | #define COMPAT_SYSCALL_DEFINE1(name, ...) \ | 30 | #define COMPAT_SYSCALL_DEFINE1(name, ...) \ |
37 | COMPAT_SYSCALL_DEFINEx(1, _##name, __VA_ARGS__) | 31 | COMPAT_SYSCALL_DEFINEx(1, _##name, __VA_ARGS__) |
38 | #define COMPAT_SYSCALL_DEFINE2(name, ...) \ | 32 | #define COMPAT_SYSCALL_DEFINE2(name, ...) \ |
@@ -49,19 +43,19 @@ | |||
49 | #ifdef CONFIG_HAVE_SYSCALL_WRAPPERS | 43 | #ifdef CONFIG_HAVE_SYSCALL_WRAPPERS |
50 | 44 | ||
51 | #define COMPAT_SYSCALL_DEFINEx(x, name, ...) \ | 45 | #define COMPAT_SYSCALL_DEFINEx(x, name, ...) \ |
52 | asmlinkage long compat_sys##name(__SC_DECL##x(__VA_ARGS__)); \ | 46 | asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__));\ |
53 | static inline long C_SYSC##name(__SC_DECL##x(__VA_ARGS__)); \ | 47 | static inline long C_SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__));\ |
54 | asmlinkage long compat_SyS##name(__SC_LONG##x(__VA_ARGS__)) \ | 48 | asmlinkage long compat_SyS##name(__MAP(x,__SC_LONG,__VA_ARGS__))\ |
55 | { \ | 49 | { \ |
56 | return (long) C_SYSC##name(__SC_CCAST##x(__VA_ARGS__)); \ | 50 | return C_SYSC##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__)); \ |
57 | } \ | 51 | } \ |
58 | SYSCALL_ALIAS(compat_sys##name, compat_SyS##name); \ | 52 | SYSCALL_ALIAS(compat_sys##name, compat_SyS##name); \ |
59 | static inline long C_SYSC##name(__SC_DECL##x(__VA_ARGS__)) | 53 | static inline long C_SYSC##name(__MAP(x,__SC_DECL,__VA_ARGS__)) |
60 | 54 | ||
61 | #else /* CONFIG_HAVE_SYSCALL_WRAPPERS */ | 55 | #else /* CONFIG_HAVE_SYSCALL_WRAPPERS */ |
62 | 56 | ||
63 | #define COMPAT_SYSCALL_DEFINEx(x, name, ...) \ | 57 | #define COMPAT_SYSCALL_DEFINEx(x, name, ...) \ |
64 | asmlinkage long compat_sys##name(__SC_DECL##x(__VA_ARGS__)) | 58 | asmlinkage long compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) |
65 | 59 | ||
66 | #endif /* CONFIG_HAVE_SYSCALL_WRAPPERS */ | 60 | #endif /* CONFIG_HAVE_SYSCALL_WRAPPERS */ |
67 | 61 | ||