Browse code

Replace redundant GNUC_PREREQ macro by AV_GCC_VERSION_AT_LEAST from libavutil.

Originally committed as revision 19677 to svn://svn.ffmpeg.org/ffmpeg/trunk

Diego Biurrun authored on 2009/08/21 19:10:42
Showing 1 changed files
... ...
@@ -24,14 +24,9 @@
24 24
 
25 25
 #include <inttypes.h>
26 26
 
27
-#if defined __GNUC__
28
-# define GNUC_PREREQ(maj, min) \
29
-        ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
30
-#else
31
-# define GNUC_PREREQ(maj, min) 0
32
-#endif
27
+#include "libavutil/common.h"
33 28
 
34
-#if GNUC_PREREQ(2,96)
29
+#if AV_GCC_VERSION_AT_LEAST(2,96)
35 30
 # define likely(x)      __builtin_expect((x) != 0, 1)
36 31
 # define unlikely(x)    __builtin_expect((x) != 0, 0)
37 32
 #else
... ...
@@ -89,7 +84,7 @@ struct unaligned_long { uint64_t l; } __attribute__((packed));
89 89
 #define ldq_u(p)        (*(const uint64_t *) (((uint64_t) (p)) & ~7ul))
90 90
 #define uldq(a)         (((const struct unaligned_long *) (a))->l)
91 91
 
92
-#if GNUC_PREREQ(3,3)
92
+#if AV_GCC_VERSION_AT_LEAST(3,3)
93 93
 #define prefetch(p)     __builtin_prefetch((p), 0, 1)
94 94
 #define prefetch_en(p)  __builtin_prefetch((p), 0, 0)
95 95
 #define prefetch_m(p)   __builtin_prefetch((p), 1, 1)
... ...
@@ -121,7 +116,7 @@ struct unaligned_long { uint64_t l; } __attribute__((packed));
121 121
 #endif
122 122
 #define wh64(p) __asm__ volatile("wh64 (%0)" : : "r"(p) : "memory")
123 123
 
124
-#if GNUC_PREREQ(3,3) && defined(__alpha_max__)
124
+#if AV_GCC_VERSION_AT_LEAST(3,3) && defined(__alpha_max__)
125 125
 #define minub8  __builtin_alpha_minub8
126 126
 #define minsb8  __builtin_alpha_minsb8
127 127
 #define minuw4  __builtin_alpha_minuw4