From ce0f7954f883c94c793bf1b93699351defae34c5 Mon Sep 17 00:00:00 2001 From: Corbin Simpson Date: Wed, 8 Jul 2009 11:26:52 -0700 Subject: [PATCH] gallium: Add endian detection to p_config. --- src/gallium/include/pipe/p_config.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/gallium/include/pipe/p_config.h b/src/gallium/include/pipe/p_config.h index c956a693a09..4152d6ac36a 100644 --- a/src/gallium/include/pipe/p_config.h +++ b/src/gallium/include/pipe/p_config.h @@ -101,6 +101,19 @@ #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. * -- 2.30.2