From ad8e1035c3feb1650640c2cfc995c1f5f917bbc7 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Thu, 12 Mar 2009 16:51:53 +0000 Subject: honour NO_LONG_DOUBLE_MATH This fixes compilation errors on hosts that turn off long double support for C99 like powerpc32. Signed-off-by: Khem Raj Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/powerpc/bits/mathdef.h | 8 +++++--- libc/sysdeps/linux/powerpc/bits/wordsize.h | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'libc/sysdeps/linux/powerpc/bits') diff --git a/libc/sysdeps/linux/powerpc/bits/mathdef.h b/libc/sysdeps/linux/powerpc/bits/mathdef.h index 81a46ddcd..f28bacece 100644 --- a/libc/sysdeps/linux/powerpc/bits/mathdef.h +++ b/libc/sysdeps/linux/powerpc/bits/mathdef.h @@ -65,11 +65,13 @@ typedef double double_t; #endif /* ISO C99 */ -#ifdef __UCLIBC_HAS_LONG_DOUBLE_MATH__ +#ifndef __NO_LONG_DOUBLE_MATH #include /* Signal that we do not really have a `long double'. The disables the declaration of all the `long double' function variants. */ # if __WORDSIZE == 32 -# undef __UCLIBC_HAS_LONG_DOUBLE_MATH__ +# define __NO_LONG_DOUBLE_MATH 1 +# elif !defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ +# define __NO_LONG_DOUBLE_MATH 1 # endif /* __WORDSIZE == 32 */ -#endif /* __UCLIBC_HAS_LONG_DOUBLE_MATH__ */ +#endif /* __NO_LONG_DOUBLE_MATH */ diff --git a/libc/sysdeps/linux/powerpc/bits/wordsize.h b/libc/sysdeps/linux/powerpc/bits/wordsize.h index dc19246d7..cf934234f 100644 --- a/libc/sysdeps/linux/powerpc/bits/wordsize.h +++ b/libc/sysdeps/linux/powerpc/bits/wordsize.h @@ -7,13 +7,13 @@ # define __WORDSIZE 32 #endif -#if defined __UCLIBC_HAS_LONG_DOUBLE_MATH__ && !defined __LONG_DOUBLE_MATH_OPTIONAL +#if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL /* Signal the glibc ABI didn't used to have a `long double'. The changes all the `long double' function variants to be redirects to the double functions. */ # define __LONG_DOUBLE_MATH_OPTIONAL 1 # ifndef __LONG_DOUBLE_128__ -# undef __UCLIBC_HAS_LONG_DOUBLE_MATH__ +# define __NO_LONG_DOUBLE_MATH 1 # endif #endif -- cgit v1.2.3