]> git.sesse.net Git - x264/commitdiff
Disable __builtin_clz() intrinsic on gcc versions prior to 3.4.
authorBrad Smith <brad@comstyle.com>
Mon, 5 Jan 2009 20:58:32 +0000 (15:58 -0500)
committerFiona Glaser <fiona@x264.com>
Mon, 5 Jan 2009 20:58:32 +0000 (15:58 -0500)
The function did not exist before that version.

common/osdep.h

index 94d5c1ada480b7a8a6e2cce1888b339a75041b8f..c9dd3c459fe4667aa5e14f6f823b690b0d3c45fc 100644 (file)
@@ -170,7 +170,7 @@ static ALWAYS_INLINE intptr_t endian_fix( intptr_t x )
 }
 #endif
 
-#ifdef __GNUC__
+#if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 3)
 #define x264_clz(x) __builtin_clz(x)
 #else
 static int ALWAYS_INLINE x264_clz( uint32_t x )