From 9e19fe6ffb69e990442a197a97394c0232768f82 Mon Sep 17 00:00:00 2001 From: Ralph Giles <giles@thaumas.net> Date: Fri, 28 Oct 2011 11:32:44 -0700 Subject: [PATCH] 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. --- celt/ecintrin.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/celt/ecintrin.h b/celt/ecintrin.h index be2294707..8f501c21f 100644 --- 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 @@ static __inline int ec_bsr(unsigned long _x){ # 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 -- GitLab