From 73d6e5c41b61633e22ea74e3aa2df721512dca57 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Sat, 14 Nov 2009 15:59:35 +0100 Subject: libm: fix C99_MATH on __NO_LONG_DOUBLE_MATH hosts alias l to their normal double counterparts. Works around problems with libgcc blindly calling __finitel on e.g. ppc32 Signed-off-by: Bernhard Reutner-Fischer --- libm/math_private.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'libm/math_private.h') diff --git a/libm/math_private.h b/libm/math_private.h index 2c5a30ac2..b6bea80ae 100644 --- a/libm/math_private.h +++ b/libm/math_private.h @@ -255,5 +255,18 @@ extern int __kernel_rem_pio2 (double*,double*,int,int,int,const int*) attribu #define math_force_eval(x) do { __typeof(x) __x = (x); __asm __volatile ("" : : "m" (__x)); } while (0) #endif +/* If we do not have long double support, then alias to the double variant. */ +#if defined __NO_LONG_DOUBLE_MATH +# define int_WRAPPER_C99(func) \ +weak_alias(func,func##l) +# else +# define int_WRAPPER_C99(func) \ +int func##l(long double x) \ +{ \ + return func((double) x); \ +} \ +libm_hidden_def(func##l) +#endif + #endif /* _MATH_PRIVATE_H_ */ -- cgit v1.2.3