summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDinar Valeev <dvaleev@suse.com>2014-02-24 11:36:54 +0100
committerKeith Packard <keithp@keithp.com>2014-06-23 13:57:46 -0700
commitadb7bc3386559dfee34b359dadcbb6796bc416e7 (patch)
tree9c0c965ca10c64efc41d96b66134b63d98ab77a0
parentea47341792cf06eda5bbdf0aca48aacc024a5be0 (diff)
arch: Fix image and bitmap byte order for ppc64le
So far PPC was big endian for sure. For ppc64le this is no longer true. Signed-off-by: Egbert Eich <eich@freedesktop.org> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--include/servermd.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/servermd.h b/include/servermd.h
index 081123be9..e41331463 100644
--- a/include/servermd.h
+++ b/include/servermd.h
@@ -114,8 +114,13 @@ SOFTWARE.
#if defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__)
-#define IMAGE_BYTE_ORDER MSBFirst
-#define BITMAP_BIT_ORDER MSBFirst
+#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
#define GLYPHPADBYTES 4
#endif /* PowerPC */