shithub: opus

Download patch

ref: 9e19fe6ffb69e990442a197a97394c0232768f82
parent: 7931a6013587160a6f83f044677dfc08671bff65
author: Ralph Giles <[email protected]>
date: Fri Oct 28 07:32:44 EDT 2011

Use the fallback __GNUC_PREREQ from arch.h in ecintrin.h.

__GNUC_PREREQ is generally defined by glibc; ecintrin.h
was checking to see if it was defined before use for
portability to non-glibc systems. However, we now have
a fallback definition in arch.h.

--- a/celt/ecintrin.h
+++ b/celt/ecintrin.h
@@ -29,6 +29,7 @@
 #include "opus_types.h"
 #include <math.h>
 #include <limits.h>
+#include "arch.h"
 #if !defined(_ecintrin_H)
 # define _ecintrin_H (1)
 
@@ -78,15 +79,13 @@
 # include "dsplib.h"
 # define EC_CLZ0    (31)
 # define EC_CLZ(_x) (_lnorm(_x))
-#elif defined(__GNUC_PREREQ)
-# if __GNUC_PREREQ(3,4)
-#  if INT_MAX>=2147483647
-#   define EC_CLZ0    ((int)sizeof(unsigned)*CHAR_BIT)
-#   define EC_CLZ(_x) (__builtin_clz(_x))
-#  elif LONG_MAX>=2147483647L
-#   define EC_CLZ0    ((int)sizeof(unsigned long)*CHAR_BIT)
-#   define EC_CLZ(_x) (__builtin_clzl(_x))
-#  endif
+#elif __GNUC_PREREQ(3,4)
+# if INT_MAX>=2147483647
+#  define EC_CLZ0    ((int)sizeof(unsigned)*CHAR_BIT)
+#  define EC_CLZ(_x) (__builtin_clz(_x))
+# elif LONG_MAX>=2147483647L
+#  define EC_CLZ0    ((int)sizeof(unsigned long)*CHAR_BIT)
+#  define EC_CLZ(_x) (__builtin_clzl(_x))
 # endif
 #endif