diff options
Diffstat (limited to 'tools/include/linux/const.h')
-rw-r--r-- | tools/include/linux/const.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/include/linux/const.h b/tools/include/linux/const.h index 7b55a55f5911..435ddd72d2c4 100644 --- a/tools/include/linux/const.h +++ b/tools/include/linux/const.h @@ -1,9 +1,14 @@ #ifndef _LINUX_CONST_H #define _LINUX_CONST_H -#include <uapi/linux/const.h> +#include <vdso/const.h> -#define UL(x) (_UL(x)) -#define ULL(x) (_ULL(x)) +/* + * This returns a constant expression while determining if an argument is + * a constant expression, most importantly without evaluating the argument. + * Glory to Martin Uecker <Martin.Uecker@med.uni-goettingen.de> + */ +#define __is_constexpr(x) \ + (sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8))) #endif /* _LINUX_CONST_H */ |