Mesa (master): gallium: add endian detection for OpenBSD
Brian Paul
brianp at kemper.freedesktop.org
Tue Mar 11 14:56:18 UTC 2014
Module: Mesa
Branch: master
Commit: 40214267aba2f357eb3334eb8235504ccb93035a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=40214267aba2f357eb3334eb8235504ccb93035a
Author: Jonathan Gray <jsg at jsg.id.au>
Date: Mon Mar 10 08:54:43 2014 -0600
gallium: add endian detection for OpenBSD
Cc: "10.0" "10.1" <mesa-stable at lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp at vmware.com>
---
src/gallium/include/pipe/p_config.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/gallium/include/pipe/p_config.h b/src/gallium/include/pipe/p_config.h
index d603681..b5e7736 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 <sys/types.h>
+#include <machine/endian.h>
+
+#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)
More information about the mesa-commit
mailing list