From ba89802466c6bb65d70a7df6da85da7b46cda25a Mon Sep 17 00:00:00 2001 From: "Robert P. J. Day" Date: Wed, 30 Apr 2008 00:55:14 -0700 Subject: [PATCH] --- yaml --- r: 95304 b: refs/heads/master c: 969a19f1c405a8e9d15ceb9e75e3f4a321aaf56f h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/byteorder/Kbuild | 6 ++---- trunk/include/linux/byteorder/big_endian.h | 2 ++ trunk/include/linux/byteorder/generic.h | 8 -------- trunk/include/linux/byteorder/little_endian.h | 2 ++ 5 files changed, 7 insertions(+), 13 deletions(-) diff --git a/[refs] b/[refs] index 9489ced3407c..b6aad4b88894 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ae50884f66fc93aa713feade8f87c03471241275 +refs/heads/master: 969a19f1c405a8e9d15ceb9e75e3f4a321aaf56f diff --git a/trunk/include/linux/byteorder/Kbuild b/trunk/include/linux/byteorder/Kbuild index 79bedddfd9ca..1133d5f9d818 100644 --- a/trunk/include/linux/byteorder/Kbuild +++ b/trunk/include/linux/byteorder/Kbuild @@ -1,5 +1,3 @@ -header-y += big_endian.h -header-y += little_endian.h - -unifdef-y += generic.h +unifdef-y += big_endian.h +unifdef-y += little_endian.h unifdef-y += swab.h diff --git a/trunk/include/linux/byteorder/big_endian.h b/trunk/include/linux/byteorder/big_endian.h index bef87891cb24..961ed4b48d8e 100644 --- a/trunk/include/linux/byteorder/big_endian.h +++ b/trunk/include/linux/byteorder/big_endian.h @@ -101,6 +101,8 @@ static inline __u16 __be16_to_cpup(const __be16 *p) #define __cpu_to_be16s(x) do {} while (0) #define __be16_to_cpus(x) do {} while (0) +#ifdef __KERNEL__ #include +#endif #endif /* _LINUX_BYTEORDER_BIG_ENDIAN_H */ diff --git a/trunk/include/linux/byteorder/generic.h b/trunk/include/linux/byteorder/generic.h index d3771551fdd9..0846e6b931ce 100644 --- a/trunk/include/linux/byteorder/generic.h +++ b/trunk/include/linux/byteorder/generic.h @@ -82,12 +82,6 @@ * */ - -#if defined(__KERNEL__) -/* - * inside the kernel, we can use nicknames; - * outside of it, we must avoid POSIX namespace pollution... - */ #define cpu_to_le64 __cpu_to_le64 #define le64_to_cpu __le64_to_cpu #define cpu_to_le32 __cpu_to_le32 @@ -176,6 +170,4 @@ static inline void be64_add_cpu(__be64 *var, u64 val) *var = cpu_to_be64(be64_to_cpu(*var) + val); } -#endif /* KERNEL */ - #endif /* _LINUX_BYTEORDER_GENERIC_H */ diff --git a/trunk/include/linux/byteorder/little_endian.h b/trunk/include/linux/byteorder/little_endian.h index 86e62b750176..05dc7c35b3b2 100644 --- a/trunk/include/linux/byteorder/little_endian.h +++ b/trunk/include/linux/byteorder/little_endian.h @@ -101,6 +101,8 @@ static inline __u16 __be16_to_cpup(const __be16 *p) #define __cpu_to_be16s(x) __swab16s((x)) #define __be16_to_cpus(x) __swab16s((x)) +#ifdef __KERNEL__ #include +#endif #endif /* _LINUX_BYTEORDER_LITTLE_ENDIAN_H */