summaryrefslogtreecommitdiffstats
path: root/main/celt051/fix-gnuc-prereq.patch
blob: 5d2731492a001f87ebff49c9f8082fed174424a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- celt-0.5.1.3.orig/libcelt/ecintrin.h
+++ celt-0.5.1.3/libcelt/ecintrin.h
@@ -52,8 +52,7 @@
 /*Count leading zeros.
   This macro should only be used for implementing ec_ilog(), if it is defined.
   All other code should use EC_ILOG() instead.*/
-#ifdef __GNUC_PREREQ
-#if __GNUC_PREREQ(3,4)
+#if defined(__GNUC__) && ((__GNUC__<<16)+__GNUC_MINOR__) >= 0x304
 # if INT_MAX>=2147483647
 #  define EC_CLZ0 sizeof(unsigned)*CHAR_BIT
 #  define EC_CLZ(_x) (__builtin_clz(_x))
@@ -61,7 +60,6 @@
 #  define EC_CLZ0 sizeof(unsigned long)*CHAR_BIT
 #  define EC_CLZ(_x) (__builtin_clzl(_x))
 # endif
-#endif
 #endif
 
 #if defined(EC_CLZ)