[PATCH 9/9] dix: Remove arch awareness from servermd.h

Adam Jackson ajax at redhat.com
Wed May 21 12:31:25 PDT 2014


At this point we have no architectures where image byte order is
different from bitmap bit order, or where either of those two aren't
also the native word endianness.  Hooray, one more place where we don't
have to worry about enabling new CPU architectures.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 include/servermd.h | 155 ++---------------------------------------------------
 1 file changed, 3 insertions(+), 152 deletions(-)

diff --git a/include/servermd.h b/include/servermd.h
index b854b7a..626c5c7 100644
--- a/include/servermd.h
+++ b/include/servermd.h
@@ -47,165 +47,16 @@ 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__
-
+#if __BYTE_ORDER__ == __ORDER_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__)
-
+#elif __BYTE_ORDER == __ORDER_BIG_ENDIAN__
 #define IMAGE_BYTE_ORDER        MSBFirst
 #define BITMAP_BIT_ORDER        MSBFirst
-
-#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
+#error "Too weird to live."
 #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__
-#define IMAGE_BYTE_ORDER        MSBFirst
-#define BITMAP_BIT_ORDER        MSBFirst
-#endif
-
-#endif                          /* __aarch64__ */
-
 #ifndef GLYPHPADBYTES
 #define GLYPHPADBYTES           4
 #endif
-- 
1.9.0



More information about the xorg-devel mailing list