From 730db44f0824f505a31822e250b9f04b9f8e7a1b Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Tue, 24 Mar 2015 00:11:47 +0100 Subject: libm: honor NO_LONG_DOUBLE in ldouble_wrappers Fixes SH build breakage due to attempts to define hidden defs for unavailable long double functions. Signed-off-by: Bernhard Reutner-Fischer --- libm/ldouble_wrappers.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'libm') diff --git a/libm/ldouble_wrappers.c b/libm/ldouble_wrappers.c index b4215cbf3..840293fe6 100644 --- a/libm/ldouble_wrappers.c +++ b/libm/ldouble_wrappers.c @@ -16,27 +16,28 @@ #include "math.h" #include -#define WRAPPER1(func) \ +#if !defined __NO_LONG_DOUBLE_MATH +# define WRAPPER1(func) \ long double func##l(long double x) \ { \ return (long double) func((double) x); \ } -#define WRAPPER2(func) \ +# define WRAPPER2(func) \ long double func##l(long double x, long double y) \ { \ return (long double) func((double) x, (double) y); \ } -#define int_WRAPPER1(func) \ +# define int_WRAPPER1(func) \ int func##l(long double x) \ { \ return func((double) x); \ } -#define long_WRAPPER1(func) \ +# define long_WRAPPER1(func) \ long func##l(long double x) \ { \ return func((double) x); \ } -#define long_long_WRAPPER1(func) \ +# define long_long_WRAPPER1(func) \ long long func##l(long double x) \ { \ return func((double) x); \ @@ -447,4 +448,6 @@ int_WRAPPER1(__isinf) libm_hidden_def(__isinfl) # endif -#endif +#endif /* __DO_C99_MATH__ */ + +#endif /* __NO_LONG_DOUBLE_MATH */ -- cgit v1.2.3