diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-01-21 15:16:58 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-03-03 22:46:22 -0500 |
commit | 4a0fd5bf0fd0795af8f1be3b261f5cf146a4cb9b (patch) | |
tree | 8f8efa46a8e4e3fc1c3163f5021aff4f94aaa7fd /include/linux | |
parent | 07fe6e00f6cca6fef85a14a1dc3ed4f2e35d3f0b (diff) | |
download | linux-4a0fd5bf0fd0795af8f1be3b261f5cf146a4cb9b.tar.gz linux-4a0fd5bf0fd0795af8f1be3b261f5cf146a4cb9b.tar.bz2 linux-4a0fd5bf0fd0795af8f1be3b261f5cf146a4cb9b.zip |
teach SYSCALL_DEFINE<n> how to deal with long long/unsigned long long
... and convert a bunch of SYSCALL_DEFINE ones to SYSCALL_DEFINE<n>,
killing the boilerplate crap around them.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/syscalls.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index f9411f0c1c80..3e07b92efbf6 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -96,9 +96,10 @@ struct sigaltstack; #define __MAP(n,...) __MAP##n(__VA_ARGS__) #define __SC_DECL(t, a) t a -#define __SC_LONG(t, a) long a +#define __TYPE_IS_LL(t) (__same_type((t)0, 0LL) || __same_type((t)0, 0ULL)) +#define __SC_LONG(t, a) __typeof(__builtin_choose_expr(__TYPE_IS_LL(t), 0LL, 0L)) a #define __SC_CAST(t, a) (t) a -#define __SC_TEST(t, a) (void)BUILD_BUG_ON_ZERO(sizeof(type) > sizeof(long)) +#define __SC_TEST(t, a) (void)BUILD_BUG_ON_ZERO(!__TYPE_IS_LL(t) && sizeof(t) > sizeof(long)) #ifdef CONFIG_FTRACE_SYSCALLS #define __SC_STR_ADECL(t, a) #a |