summaryrefslogtreecommitdiff
path: root/include/servermd.h
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2014-07-21 10:06:53 -0400
committerKeith Packard <keithp@keithp.com>2014-07-24 16:46:47 -0700
commit4302484ef2e67b2e05756c7ee0834dce938f1b44 (patch)
tree682586e15d71bffcc129ce94f62164a1cc066ffc /include/servermd.h
parent860cd209679a2e56460977882b3b3826ddcb8710 (diff)
dix: Remove arch awareness from servermd.h (v2)
At this point we have no architectures where image byte order is different from bitmap bit order, or where either of those two are not also the native word endianness. Hooray, one more place where we don't have to worry about enabling new CPU architectures. v2: Rebase to master to handle the addition of ppc64le, arc, and xtensa, and use autoconf's endianness detection instead of gcc predefines. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'include/servermd.h')
-rw-r--r--include/servermd.h185
1 files changed, 4 insertions, 181 deletions
diff --git a/include/servermd.h b/include/servermd.h
index dd1da7d4a..0132d67bf 100644
--- a/include/servermd.h
+++ b/include/servermd.h
@@ -47,195 +47,18 @@ SOFTWARE.
#ifndef SERVERMD_H
#define SERVERMD_H 1
-/*
- * Note: much of this is vestigial from mfb/cfb times. This should
- * really be simplified even further.
- */
-
-#ifdef __avr32__
-
-#define IMAGE_BYTE_ORDER MSBFirst
-#define BITMAP_BIT_ORDER MSBFirst
-
-#endif /* __avr32__ */
-
-#ifdef __arm32__
+#include "dix-config.h"
+#if X_BYTE_ORDER == X_LITTLE_ENDIAN
#define IMAGE_BYTE_ORDER LSBFirst
#define BITMAP_BIT_ORDER LSBFirst
-
-#endif /* __arm32__ */
-
-#if defined(__nds32__)
-
-#define IMAGE_BYTE_ORDER LSBFirst
-
-#endif /* __nds32__ */
-
-#if defined __hppa__
-
-#define IMAGE_BYTE_ORDER MSBFirst
-#define BITMAP_BIT_ORDER MSBFirst
-#endif /* hpux || __hppa__ */
-
-#if defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__)
-
-#if defined(__LITTLE_ENDIAN__)
-#define IMAGE_BYTE_ORDER LSBFirst
-#define BITMAP_BIT_ORDER LSBFirst
-#else
-#define IMAGE_BYTE_ORDER MSBFirst
-#define BITMAP_BIT_ORDER MSBFirst
-#endif
-
-#endif /* PowerPC */
-
-#if defined(__sh__)
-
-#if defined(__BIG_ENDIAN__)
-#define IMAGE_BYTE_ORDER MSBFirst
-#define BITMAP_BIT_ORDER MSBFirst
-#else
-#define IMAGE_BYTE_ORDER LSBFirst
-#define BITMAP_BIT_ORDER LSBFirst
-#endif
-
-#endif /* SuperH */
-
-#if defined(__m32r__)
-
-#if defined(__BIG_ENDIAN__)
-#define IMAGE_BYTE_ORDER MSBFirst
-#define BITMAP_BIT_ORDER MSBFirst
-#else
-#define IMAGE_BYTE_ORDER LSBFirst
-#define BITMAP_BIT_ORDER LSBFirst
-#endif
-
-#endif /* __m32r__ */
-
-#if defined(sun386) || defined(sun5)
-#define IMAGE_BYTE_ORDER LSBFirst /* Values for the SUN only */
-#define BITMAP_BIT_ORDER LSBFirst
-#else
-#define IMAGE_BYTE_ORDER MSBFirst /* Values for the SUN only */
-#define BITMAP_BIT_ORDER MSBFirst
-#endif
-
-#if (defined(mips) || defined(__mips))
-
-#if defined(MIPSEL) || defined(__MIPSEL__)
-#define IMAGE_BYTE_ORDER LSBFirst /* Values for the PMAX only */
-#define BITMAP_BIT_ORDER LSBFirst
-#else
-#define IMAGE_BYTE_ORDER MSBFirst /* Values for the MIPS only */
-#define BITMAP_BIT_ORDER MSBFirst
-#endif
-
-#endif /* mips */
-
-#if defined(__alpha) || defined(__alpha__)
-#define IMAGE_BYTE_ORDER LSBFirst /* Values for the Alpha only */
-#define BITMAP_BIT_ORDER LSBFirst
-#endif /* alpha */
-
-#if defined (linux) && defined (__s390__)
-
-#define IMAGE_BYTE_ORDER MSBFirst
-#define BITMAP_BIT_ORDER MSBFirst
-
-#endif /* linux/s390 */
-
-#if defined (linux) && defined (__s390x__)
-
-#define IMAGE_BYTE_ORDER MSBFirst
-#define BITMAP_BIT_ORDER MSBFirst
-
-#endif /* linux/s390x */
-
-#if defined(__ia64__) || defined(ia64)
-
-#define IMAGE_BYTE_ORDER LSBFirst
-#define BITMAP_BIT_ORDER LSBFirst
-
-#endif /* ia64 */
-
-#if defined(__amd64__) || defined(amd64) || defined(__amd64)
-#define IMAGE_BYTE_ORDER LSBFirst
-#define BITMAP_BIT_ORDER LSBFirst
-#endif /* AMD64 */
-
-#if defined(SVR4) && (defined(__i386__) || defined(__i386) ) || \
- defined(__alpha__) || defined(__alpha) || \
- defined(__i386__)
-
-#ifndef IMAGE_BYTE_ORDER
-#define IMAGE_BYTE_ORDER LSBFirst
-#endif
-
-#ifndef BITMAP_BIT_ORDER
-#define BITMAP_BIT_ORDER LSBFirst
-#endif
-
-#endif /* SVR4 / BSD / i386 */
-
-#if defined (linux) && defined (__mc68000__)
-
-#define IMAGE_BYTE_ORDER MSBFirst
-#define BITMAP_BIT_ORDER MSBFirst
-
-#endif /* linux/m68k */
-
-/* linux on ARM */
-#if defined(linux) && defined(__arm__)
-#define IMAGE_BYTE_ORDER LSBFirst
-#define BITMAP_BIT_ORDER LSBFirst
-#endif
-
-/* linux on IBM S/390 */
-#if defined (linux) && defined (__s390__)
-#define IMAGE_BYTE_ORDER MSBFirst
-#define BITMAP_BIT_ORDER MSBFirst
-#endif /* linux/s390 */
-
-#ifdef __aarch64__
-
-#ifdef __AARCH64EL__
-#define IMAGE_BYTE_ORDER LSBFirst
-#define BITMAP_BIT_ORDER LSBFirst
-#endif
-#ifdef __AARCH64EB__
+#elif X_BYTE_ORDER == X_BIG_ENDIAN
#define IMAGE_BYTE_ORDER MSBFirst
#define BITMAP_BIT_ORDER MSBFirst
-#endif
-
-#endif /* __aarch64__ */
-
-#if defined(__arc__)
-
-#if defined(__BIG_ENDIAN__)
-#define IMAGE_BYTE_ORDER MSBFirst
-#define BITMAP_BIT_ORDER MSBFirst
#else
-#define IMAGE_BYTE_ORDER LSBFirst
-#define BITMAP_BIT_ORDER LSBFirst
+#error "Too weird to live."
#endif
-#endif /* ARC */
-
-#ifdef __xtensa__
-
-#ifdef __XTENSA_EL__
-#define IMAGE_BYTE_ORDER LSBFirst
-#define BITMAP_BIT_ORDER LSBFirst
-#endif
-#ifdef __XTENSA_EB__
-#define IMAGE_BYTE_ORDER MSBFirst
-#define BITMAP_BIT_ORDER MSBFirst
-#endif
-
-#endif /* __xtensa__ */
-
#ifndef GLYPHPADBYTES
#define GLYPHPADBYTES 4
#endif