aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/include/pipe/p_config.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/include/pipe/p_config.h')
-rw-r--r--src/gallium/include/pipe/p_config.h21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/gallium/include/pipe/p_config.h b/src/gallium/include/pipe/p_config.h
index eea3d79e64b..b3a7b337bc6 100644
--- a/src/gallium/include/pipe/p_config.h
+++ b/src/gallium/include/pipe/p_config.h
@@ -99,9 +99,9 @@
#endif
#endif
-#if defined(__PPC__)
+#if defined(__ppc__) || defined(__ppc64__) || defined(__PPC__)
#define PIPE_ARCH_PPC
-#if defined(__PPC64__)
+#if defined(__ppc64__) || defined(__PPC64__)
#define PIPE_ARCH_PPC_64
#endif
#endif
@@ -120,6 +120,15 @@
# define PIPE_ARCH_BIG_ENDIAN
#endif
+#elif defined(__APPLE__)
+#include <machine/endian.h>
+
+#if __DARWIN_BYTE_ORDER == __DARWIN_LITTLE_ENDIAN
+# define PIPE_ARCH_LITTLE_ENDIAN
+#elif __DARWIN_BYTE_ORDER == __DARWIN_BIG_ENDIAN
+# define PIPE_ARCH_BIG_ENDIAN
+#endif
+
#else
#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
@@ -145,6 +154,14 @@
#define PIPE_OS_UNIX
#endif
+/*
+ * Android defines __linux__ so PIPE_OS_LINUX and PIPE_OS_UNIX will also be
+ * defined.
+ */
+#if defined(ANDROID)
+#define PIPE_OS_ANDROID
+#endif
+
#if defined(__FreeBSD__)
#define PIPE_OS_FREEBSD
#define PIPE_OS_BSD