From: Jonathan Gray Date: Mon, 10 Mar 2014 14:54:43 +0000 (-0600) Subject: gallium: add endian detection for OpenBSD X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=40214267aba2f357eb3334eb8235504ccb93035a;p=mesa.git gallium: add endian detection for OpenBSD Cc: "10.0" "10.1" Reviewed-by: Brian Paul --- diff --git a/src/gallium/include/pipe/p_config.h b/src/gallium/include/pipe/p_config.h index d6036818fd8..b5e773694a5 100644 --- a/src/gallium/include/pipe/p_config.h +++ b/src/gallium/include/pipe/p_config.h @@ -157,6 +157,16 @@ # define PIPE_ARCH_BIG_ENDIAN #endif +#elif defined(__OpenBSD__) +#include +#include + +#if _BYTE_ORDER == _LITTLE_ENDIAN +# define PIPE_ARCH_LITTLE_ENDIAN +#elif _BYTE_ORDER == _BIG_ENDIAN +# define PIPE_ARCH_BIG_ENDIAN +#endif + #else #if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64) || defined(PIPE_ARCH_ARM) || defined(PIPE_ARCH_AARCH64)