summaryrefslogtreecommitdiffstats
path: root/include/linux/byteorder/generic.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-06-28 09:56:23 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-06-28 13:49:16 +0200
commit51885a7d7321c3e6395c36bc4fe8dde7e78cf562 (patch)
treec656f1c1e2571181aed4870aaa2e63861120d783 /include/linux/byteorder/generic.h
parenta6e358b2f5b219fda18a7bc9348cb969043c19d5 (diff)
downloadbarebox-51885a7d7321c3e6395c36bc4fe8dde7e78cf562.tar.gz
barebox-51885a7d7321c3e6395c36bc4fe8dde7e78cf562.tar.xz
Change byte order detection mechanism to kernel style
The Linux Kernel defines only one of __LITTLE_ENDIAN and __BIG_ENDIAN. Endianess can then be tested with #ifdef __xx_ENDIAN. Userspace always defined both __LITTLE_ENDIAN and __BIG_ENDIAN and byteorder can then be tested with #if __BYTE_ORDER == __xx_ENDIAN. As we tend to use a lot of Kernel code in barebox we switch to use the kernel way of determing the byte order. As this always causes a lot of confusion add a check to include/common.h to make sure only one of __LITTLE_ENDIAN and __BIG_ENDIAN is defined. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/linux/byteorder/generic.h')
-rw-r--r--include/linux/byteorder/generic.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/include/linux/byteorder/generic.h b/include/linux/byteorder/generic.h
index aab8f4b6bf..2d68d99fa4 100644
--- a/include/linux/byteorder/generic.h
+++ b/include/linux/byteorder/generic.h
@@ -78,13 +78,6 @@
*
*/
-#ifndef __LITTLE_ENDIAN
-#define __LITTLE_ENDIAN 1234
-#endif
-#ifndef __BIG_ENDIAN
-#define __BIG_ENDIAN 4321
-#endif
-
#if defined(__KERNEL__)
/*
* inside the kernel, we can use nicknames;