aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/imports.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-07-28 18:15:53 +0000
committermarha <marha@users.sourceforge.net>2010-07-28 18:15:53 +0000
commit022d9c6cf6a67385d84ff33ce095f5c7f9f6d0cc (patch)
tree1c6bef40b9b16775f2d9b39f88d6224e0bea69ff /mesalib/src/mesa/main/imports.h
parent51e3b8e993cc874f4ac4ba4162c7aea00fe1a8eb (diff)
downloadvcxsrv-022d9c6cf6a67385d84ff33ce095f5c7f9f6d0cc.tar.gz
vcxsrv-022d9c6cf6a67385d84ff33ce095f5c7f9f6d0cc.tar.bz2
vcxsrv-022d9c6cf6a67385d84ff33ce095f5c7f9f6d0cc.zip
Update to mesa 7,8,2
Diffstat (limited to 'mesalib/src/mesa/main/imports.h')
-rw-r--r--mesalib/src/mesa/main/imports.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/mesalib/src/mesa/main/imports.h b/mesalib/src/mesa/main/imports.h
index d28f4ad12..1c263aabc 100644
--- a/mesalib/src/mesa/main/imports.h
+++ b/mesalib/src/mesa/main/imports.h
@@ -404,7 +404,8 @@ _mesa_is_pow_two(int x)
static INLINE int32_t
_mesa_next_pow_two_32(uint32_t x)
{
-#ifdef __GNUC__
+#if defined(__GNUC__) && \
+ ((__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || __GNUC__ >= 4)
uint32_t y = (x != 1);
return (1 + y) << ((__builtin_clz(x - y) ^ 31) );
#else
@@ -422,7 +423,8 @@ _mesa_next_pow_two_32(uint32_t x)
static INLINE int64_t
_mesa_next_pow_two_64(uint64_t x)
{
-#ifdef __GNUC__
+#if defined(__GNUC__) && \
+ ((__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || __GNUC__ >= 4)
uint64_t y = (x != 1);
if (sizeof(x) == sizeof(long))
return (1 + y) << ((__builtin_clzl(x - y) ^ 63));