Undefine __floor to avoid name clash. --- sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c | 3 +++ sysdeps/x86_64/fpu/math_private.h | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c b/sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c index 5df4ab5..2ff7133 100644 --- a/sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c +++ b/sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c @@ -45,6 +45,9 @@ static const double huge = 1.0e300; +#ifdef __x86_64__ +# undef __floor +#endif double __floor (double x) diff --git a/sysdeps/x86_64/fpu/math_private.h b/sysdeps/x86_64/fpu/math_private.h index 7f52d5e..69bfe74 100644 --- a/sysdeps/x86_64/fpu/math_private.h +++ b/sysdeps/x86_64/fpu/math_private.h @@ -110,7 +110,7 @@ asm ("fsqrt" : "=t" (__res) : "0" ((long double) (d))); \ __res; }) -#ifdef __SSE4_1__ +#ifdef __SSE4_1__ # ifndef __rint # ifdef __AVX__ # define __rint(d) \ @@ -139,17 +139,17 @@ # endif # ifndef __floor -# ifdef __AVX__ +# ifdef __AVX__ # define __floor(d) \ ({ double __res; \ asm ("vroundsd $1, %1, %0, %0" : "=x" (__res) : "xm" ((double) (d))); \ __res; }) -# else +# else # define __floor(d) \ ({ double __res; \ asm ("roundsd $1, %1, %0" : "=x" (__res) : "xm" ((double) (d))); \ __res; }) -# endif +# endif # endif # ifndef __floorf # ifdef __AVX__ @@ -164,7 +164,7 @@ __res; }) # endif # endif -#endif +#endif /* Specialized variants of the interfaces which only handle