summaryrefslogtreecommitdiff
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2006-09-21 15:51:06 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2006-09-21 15:51:06 +0000
commit32e0efbdbeb06170befc63af685d67711acc6c81 (patch)
tree46672e43802e090abffd415167ab6ee017fbda59 /src/mesa/main
parent81e0d73780362c3b2671bce9e49cb05930c747bc (diff)
added _mesa_little_endian()
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/imports.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index a17a0fd18c..9fb02a7e9c 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5.1
+ * Version: 6.5.2
*
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
*
@@ -604,6 +604,17 @@ do { \
#endif
+/**
+ * Return 1 if this is a little endian machine, 0 if big endian.
+ */
+static INLINE GLboolean
+_mesa_little_endian(void)
+{
+ const GLuint ui = 1; /* intentionally not static */
+ return *((const GLubyte *) &ui);
+}
+
+
/**********************************************************************
* Functions