aboutsummaryrefslogtreecommitdiff
path: root/fontconfig/src/fcarch.h
diff options
context:
space:
mode:
Diffstat (limited to 'fontconfig/src/fcarch.h')
-rw-r--r--fontconfig/src/fcarch.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/fontconfig/src/fcarch.h b/fontconfig/src/fcarch.h
index 9cabf0450..22e6f8e13 100644
--- a/fontconfig/src/fcarch.h
+++ b/fontconfig/src/fcarch.h
@@ -46,9 +46,28 @@
* be64 1234 8 8
*/
-#if defined(WORDS_BIGENDIAN) && WORDS_BIGENDIAN
+#ifdef __APPLE__
+# include <machine/endian.h>
+# undef SIZEOF_VOID_P
+# undef ALIGNOF_DOUBLE
+# ifdef __LP64__
+# define SIZEOF_VOID_P 8
+# define ALIGNOF_DOUBLE 8
+# else
+# define SIZEOF_VOID_P 4
+# define ALIGNOF_DOUBLE 4
+# endif
+#endif
+
+#if defined(__DARWIN_BYTE_ORDER) && __DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN
+# define FC_ARCH_ENDIAN "le"
+#elif defined(__DARWIN_BYTE_ORDER) && __DARWIN_BYTE_ORDER == __DARWIN_BIG_ENDIAN
+# define FC_ARCH_ENDIAN "be"
+#elif defined(__DARWIN_BYTE_ORDER) && __DARWIN_BYTE_ORDER == __DARWIN_PDP_ENDIAN
+# define FC_ARCH_ENDIAN "pe"
+#elif defined(WORDS_BIGENDIAN) && WORDS_BIGENDIAN
# define FC_ARCH_ENDIAN "be"
-#else /* !WORDS_BIGENDIAN */
+#else
# define FC_ARCH_ENDIAN "le"
#endif