summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libc/arch-arm/include/machine/endian.h4
-rw-r--r--libc/arch-arm64/include/machine/endian.h9
-rw-r--r--libc/arch-mips/include/machine/endian.h4
-rw-r--r--libc/arch-mips64/include/machine/endian.h4
-rw-r--r--libc/arch-x86_64/include/machine/endian.h1
5 files changed, 3 insertions, 19 deletions
diff --git a/libc/arch-arm/include/machine/endian.h b/libc/arch-arm/include/machine/endian.h
index 8d9723d..04bba20 100644
--- a/libc/arch-arm/include/machine/endian.h
+++ b/libc/arch-arm/include/machine/endian.h
@@ -67,11 +67,7 @@
#endif /* __GNUC__ */
-#if defined(__ARMEB__)
-#define _BYTE_ORDER _BIG_ENDIAN
-#else
#define _BYTE_ORDER _LITTLE_ENDIAN
-#endif
#define __STRICT_ALIGNMENT
#include <sys/types.h>
#include <sys/endian.h>
diff --git a/libc/arch-arm64/include/machine/endian.h b/libc/arch-arm64/include/machine/endian.h
index 87a038d..4743733 100644
--- a/libc/arch-arm64/include/machine/endian.h
+++ b/libc/arch-arm64/include/machine/endian.h
@@ -29,9 +29,6 @@
#ifndef _AARCH64_ENDIAN_H_
#define _AARCH64_ENDIAN_H_
-#include <sys/types.h>
-#include <sys/endian.h>
-
#ifdef __GNUC__
#define __swap16md(x) ({ \
@@ -49,10 +46,8 @@
#endif /* __GNUC__ */
-#if defined(__AARCH64EB__)
-#define _BYTE_ORDER _BIG_ENDIAN
-#else
#define _BYTE_ORDER _LITTLE_ENDIAN
-#endif
+#include <sys/types.h>
+#include <sys/endian.h>
#endif /* _AARCH64_ENDIAN_H_ */
diff --git a/libc/arch-mips/include/machine/endian.h b/libc/arch-mips/include/machine/endian.h
index 41a9004..9270e9d 100644
--- a/libc/arch-mips/include/machine/endian.h
+++ b/libc/arch-mips/include/machine/endian.h
@@ -58,11 +58,7 @@
#endif /* __mips32r2__ */
#endif /* __GNUC__ */
-#if defined(__MIPSEB__)
-#define _BYTE_ORDER _BIG_ENDIAN
-#else
#define _BYTE_ORDER _LITTLE_ENDIAN
-#endif
#define __STRICT_ALIGNMENT
#include <sys/types.h>
#include <sys/endian.h>
diff --git a/libc/arch-mips64/include/machine/endian.h b/libc/arch-mips64/include/machine/endian.h
index 41a9004..9270e9d 100644
--- a/libc/arch-mips64/include/machine/endian.h
+++ b/libc/arch-mips64/include/machine/endian.h
@@ -58,11 +58,7 @@
#endif /* __mips32r2__ */
#endif /* __GNUC__ */
-#if defined(__MIPSEB__)
-#define _BYTE_ORDER _BIG_ENDIAN
-#else
#define _BYTE_ORDER _LITTLE_ENDIAN
-#endif
#define __STRICT_ALIGNMENT
#include <sys/types.h>
#include <sys/endian.h>
diff --git a/libc/arch-x86_64/include/machine/endian.h b/libc/arch-x86_64/include/machine/endian.h
index 7889a37..8a3b0c5 100644
--- a/libc/arch-x86_64/include/machine/endian.h
+++ b/libc/arch-x86_64/include/machine/endian.h
@@ -56,6 +56,7 @@
#endif /* __GNUC__ */
#define _BYTE_ORDER _LITTLE_ENDIAN
+#include <sys/types.h>
#include <sys/endian.h>
#endif /* _MACHINE_ENDIAN_H_ */