[Mesa-dev] [PATCH] Fix _GNUC__ typo in check for gcc 3.x for _mesa_bitcount
Alan Coopersmith
alan.coopersmith at oracle.com
Thu Oct 20 17:58:34 PDT 2011
Without this fix, builds with gcc 3.4.x end up depending on undefined
_mesa_bitcount instead of gcc's __builtin_popcount.
NOTE: This is a candidate for the stable branches.
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
src/mesa/main/imports.c | 2 +-
src/mesa/main/imports.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index 345a1c5..1c44727 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -514,7 +514,7 @@ _mesa_ffsll(int64_t val)
#endif
#if !defined(__GNUC__) ||\
- ((_GNUC__ == 3 && __GNUC_MINOR__ < 4) && __GNUC__ < 4)
+ ((__GNUC__ == 3 && __GNUC_MINOR__ < 4) && __GNUC__ < 4)
/**
* Return number of bits set in given GLuint.
*/
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index 20fa148..ade5441 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -576,7 +576,7 @@ _mesa_init_sqrt_table(void);
#define _mesa_ffs(i) ffs(i)
#define _mesa_ffsll(i) ffsll(i)
-#if ((_GNUC__ == 3 && __GNUC_MINOR__ >= 4) || __GNUC__ >= 4)
+#if ((__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || __GNUC__ >= 4)
#define _mesa_bitcount(i) __builtin_popcount(i)
#define _mesa_bitcount_64(i) __builtin_popcountll(i)
#else
--
1.7.3.2
More information about the mesa-dev
mailing list