From f090bca2d80a1f64fcfe07bb6f4efe7d1a00d741 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 26 Feb 2009 00:53:43 +0100 Subject: [PATCH] add __[lb]e types Signed-off-by: Sascha Hauer --- include/linux/types.h | 22 ++++++++++++++++++++++ include/types.h | 2 ++ 2 files changed, 24 insertions(+) diff --git a/include/linux/types.h b/include/linux/types.h index 9346a7d60..8646e0318 100644 --- a/include/linux/types.h +++ b/include/linux/types.h @@ -116,6 +116,28 @@ typedef __s64 int64_t; * any application/library that wants linux/types.h. */ +#ifdef __CHECKER__ +#define __bitwise__ __attribute__((bitwise)) +#else +#define __bitwise__ +#endif +#ifdef __CHECK_ENDIAN__ +#define __bitwise __bitwise__ +#else +#define __bitwise +#endif + +typedef __u16 __bitwise __le16; +typedef __u16 __bitwise __be16; +typedef __u32 __bitwise __le32; +typedef __u32 __bitwise __be32; +#if defined(__GNUC__) +typedef __u64 __bitwise __le64; +typedef __u64 __bitwise __be64; +#endif +typedef __u16 __bitwise __sum16; +typedef __u32 __bitwise __wsum; + struct ustat { __kernel_daddr_t f_tfree; __kernel_ino_t f_tinode; diff --git a/include/types.h b/include/types.h index e192920d6..0bfe3b9a0 100644 --- a/include/types.h +++ b/include/types.h @@ -1,6 +1,8 @@ #ifndef __TYPES_H #define __TYPES_H +#include + typedef volatile unsigned long vu_long; typedef volatile unsigned short vu_short; typedef volatile unsigned char vu_char;