[PATCH 17/18] scripts: compiler.h: use Linux <endian.h> as default

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Other systems mimic the GNU endianness headers, e.g. Cygwin. Instead of
explicitly listing them, just make the Linux case the default case by
moving it into the #else clause.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 scripts/compiler.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/compiler.h b/scripts/compiler.h
index ee2097aa3691..01b0de44f18a 100644
--- a/scripts/compiler.h
+++ b/scripts/compiler.h
@@ -38,10 +38,7 @@
 #define O_BINARY	0
 #endif
 
-#ifdef __linux__
-# include <endian.h>
-# include <byteswap.h>
-#elif defined(__MACH__)
+#if defined(__MACH__)
 # ifdef __APPLE__
 #  include <libkern/OSByteOrder.h>
 #  define htobe16(x) OSSwapHostToBigInt16(x)
@@ -64,6 +61,9 @@
 # define __BIG_ENDIAN    BIG_ENDIAN
 typedef unsigned long ulong;
 typedef unsigned int  uint;
+#else /* assume Linux */
+# include <endian.h>
+# include <byteswap.h>
 #endif
 
 typedef uint8_t __u8;
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux