gallium: Add endian detection to p_config.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Wed, 8 Jul 2009 18:26:52 +0000 (11:26 -0700)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Wed, 8 Jul 2009 18:26:52 +0000 (11:26 -0700)
src/gallium/include/pipe/p_config.h

index c956a693a09f017e0172d05f0ce83c64438a1725..4152d6ac36a8ba053191d888402a3500244630ed 100644 (file)
 #endif
 
 
+/*
+ * Endian detection.
+ */
+
+#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
+#define PIPE_ARCH_LITTLE_ENDIAN
+#elif defined(PIPE_ARCH_PPC) || defined(PIPE_ARCH_PPC_64)
+#define PIPE_ARCH_BIG_ENDIAN
+#else
+#define PIPE_ARCH_UNKNOWN_ENDIAN
+#endif
+
+
 /*
  * Operating system family.
  *