diff options
Diffstat (limited to 'sysdeps')
94 files changed, 167 insertions, 30 deletions
diff --git a/sysdeps/generic/math-type-macros-double.h b/sysdeps/generic/math-type-macros-double.h index 6116f7f32f..a755699190 100644 --- a/sysdeps/generic/math-type-macros-double.h +++ b/sysdeps/generic/math-type-macros-double.h @@ -47,7 +47,9 @@ /* Supply the generic macros. */ #include <math-type-macros.h> -/* Do not use the type-generic wrapper templates. */ -#define __USE_WRAPPER_TEMPLATE 0 +/* Do not use the type-generic wrapper templates if compatibility with + SVID error handling is needed. */ +#include <math-svid-compat.h> +#define __USE_WRAPPER_TEMPLATE !LIBM_SVID_COMPAT #endif diff --git a/sysdeps/generic/math-type-macros-float.h b/sysdeps/generic/math-type-macros-float.h index 712e517a81..cc8c4b0bcd 100644 --- a/sysdeps/generic/math-type-macros-float.h +++ b/sysdeps/generic/math-type-macros-float.h @@ -33,7 +33,9 @@ /* Supply the generic macros. */ #include <math-type-macros.h> -/* Do not use the type-generic wrapper templates. */ -#define __USE_WRAPPER_TEMPLATE 0 +/* Do not use the type-generic wrapper templates if compatibility with + SVID error handling is needed. */ +#include <math-svid-compat.h> +#define __USE_WRAPPER_TEMPLATE !LIBM_SVID_COMPAT #endif diff --git a/sysdeps/generic/math-type-macros-ldouble.h b/sysdeps/generic/math-type-macros-ldouble.h index 4e02e53f70..7dbd559249 100644 --- a/sysdeps/generic/math-type-macros-ldouble.h +++ b/sysdeps/generic/math-type-macros-ldouble.h @@ -30,7 +30,9 @@ /* Supply the generic macros. */ #include <math-type-macros.h> -/* Do not use the type-generic wrapper templates. */ -#define __USE_WRAPPER_TEMPLATE 0 +/* Do not use the type-generic wrapper templates if compatibility with + SVID error handling is needed. */ +#include <math-svid-compat.h> +#define __USE_WRAPPER_TEMPLATE !LIBM_SVID_COMPAT #endif diff --git a/sysdeps/i386/fpu/w_sqrt.c b/sysdeps/i386/fpu/w_sqrt.c new file mode 100644 index 0000000000..d37a5d55bf --- /dev/null +++ b/sysdeps/i386/fpu/w_sqrt.c @@ -0,0 +1,9 @@ +/* The inline __ieee754_sqrt is not correctly rounding; it's OK for + most internal uses in glibc, but not for sqrt itself. */ +#define __ieee754_sqrt __avoid_ieee754_sqrt +#include <math.h> +#include <math_private.h> +#undef __ieee754_sqrt +extern double __ieee754_sqrt (double); +#include <math-type-macros-double.h> +#include <w_sqrt_template.c> diff --git a/sysdeps/ia64/fpu/w_acos.c b/sysdeps/ia64/fpu/w_acos.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_acos.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_acosf.c b/sysdeps/ia64/fpu/w_acosf.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_acosf.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_acosh.c b/sysdeps/ia64/fpu/w_acosh.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_acosh.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_acoshf.c b/sysdeps/ia64/fpu/w_acoshf.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_acoshf.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_acoshl.c b/sysdeps/ia64/fpu/w_acoshl.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_acoshl.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_acosl.c b/sysdeps/ia64/fpu/w_acosl.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_acosl.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_asin.c b/sysdeps/ia64/fpu/w_asin.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_asin.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_asinf.c b/sysdeps/ia64/fpu/w_asinf.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_asinf.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_asinl.c b/sysdeps/ia64/fpu/w_asinl.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_asinl.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_atan2.c b/sysdeps/ia64/fpu/w_atan2.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_atan2.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_atan2f.c b/sysdeps/ia64/fpu/w_atan2f.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_atan2f.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_atan2l.c b/sysdeps/ia64/fpu/w_atan2l.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_atan2l.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_atanh.c b/sysdeps/ia64/fpu/w_atanh.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_atanh.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_atanhf.c b/sysdeps/ia64/fpu/w_atanhf.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_atanhf.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_atanhl.c b/sysdeps/ia64/fpu/w_atanhl.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_atanhl.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_cosh.c b/sysdeps/ia64/fpu/w_cosh.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_cosh.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_coshf.c b/sysdeps/ia64/fpu/w_coshf.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_coshf.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_coshl.c b/sysdeps/ia64/fpu/w_coshl.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_coshl.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_exp.c b/sysdeps/ia64/fpu/w_exp.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_exp.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_exp10.c b/sysdeps/ia64/fpu/w_exp10.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_exp10.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_exp10f.c b/sysdeps/ia64/fpu/w_exp10f.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_exp10f.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_exp10l.c b/sysdeps/ia64/fpu/w_exp10l.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_exp10l.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_exp2.c b/sysdeps/ia64/fpu/w_exp2.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_exp2.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_exp2f.c b/sysdeps/ia64/fpu/w_exp2f.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_exp2f.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_exp2l.c b/sysdeps/ia64/fpu/w_exp2l.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_exp2l.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_expf.c b/sysdeps/ia64/fpu/w_expf.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_expf.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_expl.c b/sysdeps/ia64/fpu/w_expl.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_expl.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_fmod.c b/sysdeps/ia64/fpu/w_fmod.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_fmod.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_fmodf.c b/sysdeps/ia64/fpu/w_fmodf.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_fmodf.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_fmodl.c b/sysdeps/ia64/fpu/w_fmodl.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_fmodl.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_hypot.c b/sysdeps/ia64/fpu/w_hypot.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_hypot.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_hypotf.c b/sysdeps/ia64/fpu/w_hypotf.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_hypotf.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_hypotl.c b/sysdeps/ia64/fpu/w_hypotl.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_hypotl.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_lgamma_r.c b/sysdeps/ia64/fpu/w_lgamma_r.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_lgamma_r.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_lgammaf_r.c b/sysdeps/ia64/fpu/w_lgammaf_r.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_lgammaf_r.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_lgammal_r.c b/sysdeps/ia64/fpu/w_lgammal_r.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_lgammal_r.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_log.c b/sysdeps/ia64/fpu/w_log.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_log.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_log10.c b/sysdeps/ia64/fpu/w_log10.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_log10.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_log10f.c b/sysdeps/ia64/fpu/w_log10f.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_log10f.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_log10l.c b/sysdeps/ia64/fpu/w_log10l.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_log10l.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_log2.c b/sysdeps/ia64/fpu/w_log2.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_log2.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_log2f.c b/sysdeps/ia64/fpu/w_log2f.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_log2f.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_log2l.c b/sysdeps/ia64/fpu/w_log2l.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_log2l.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_logf.c b/sysdeps/ia64/fpu/w_logf.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_logf.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_logl.c b/sysdeps/ia64/fpu/w_logl.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_logl.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_pow.c b/sysdeps/ia64/fpu/w_pow.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_pow.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_powf.c b/sysdeps/ia64/fpu/w_powf.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_powf.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_powl.c b/sysdeps/ia64/fpu/w_powl.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_powl.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_remainder.c b/sysdeps/ia64/fpu/w_remainder.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_remainder.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_remainderf.c b/sysdeps/ia64/fpu/w_remainderf.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_remainderf.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_remainderl.c b/sysdeps/ia64/fpu/w_remainderl.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_remainderl.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_sinh.c b/sysdeps/ia64/fpu/w_sinh.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_sinh.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_sinhf.c b/sysdeps/ia64/fpu/w_sinhf.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_sinhf.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_sinhl.c b/sysdeps/ia64/fpu/w_sinhl.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_sinhl.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_sqrt.c b/sysdeps/ia64/fpu/w_sqrt.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_sqrt.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_sqrtf.c b/sysdeps/ia64/fpu/w_sqrtf.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_sqrtf.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_sqrtl.c b/sysdeps/ia64/fpu/w_sqrtl.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_sqrtl.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_tgamma.c b/sysdeps/ia64/fpu/w_tgamma.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_tgamma.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_tgammaf.c b/sysdeps/ia64/fpu/w_tgammaf.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_tgammaf.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ia64/fpu/w_tgammal.c b/sysdeps/ia64/fpu/w_tgammal.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ia64/fpu/w_tgammal.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/ieee754/dbl-64/w_exp_compat.c b/sysdeps/ieee754/dbl-64/w_exp_compat.c index 69ec0a1ebc..98aa5b76a0 100644 --- a/sysdeps/ieee754/dbl-64/w_exp_compat.c +++ b/sysdeps/ieee754/dbl-64/w_exp_compat.c @@ -20,6 +20,7 @@ #include <math_private.h> #include <math-svid-compat.h> +#if LIBM_SVID_COMPAT /* wrapper exp */ double __exp (double x) @@ -33,7 +34,8 @@ __exp (double x) } hidden_def (__exp) weak_alias (__exp, exp) -#ifdef NO_LONG_DOUBLE +# ifdef NO_LONG_DOUBLE strong_alias (__exp, __expl) weak_alias (__exp, expl) +# endif #endif diff --git a/sysdeps/ieee754/flt-32/w_expf_compat.c b/sysdeps/ieee754/flt-32/w_expf_compat.c index 8a1fa51e46..a38ff4082d 100644 --- a/sysdeps/ieee754/flt-32/w_expf_compat.c +++ b/sysdeps/ieee754/flt-32/w_expf_compat.c @@ -20,6 +20,7 @@ #include <math_private.h> #include <math-svid-compat.h> +#if LIBM_SVID_COMPAT /* wrapper expf */ float __expf (float x) @@ -33,3 +34,4 @@ __expf (float x) } hidden_def (__expf) weak_alias (__expf, expf) +#endif diff --git a/sysdeps/ieee754/k_standard.c b/sysdeps/ieee754/k_standard.c index 8f906bd604..f74f9c712e 100644 --- a/sysdeps/ieee754/k_standard.c +++ b/sysdeps/ieee754/k_standard.c @@ -21,23 +21,25 @@ static char rcsid[] = "$NetBSD: k_standard.c,v 1.6 1995/05/10 20:46:35 jtc Exp $ #include <assert.h> -#ifndef _USE_WRITE -#include <stdio.h> /* fputs(), stderr */ -#define WRITE2(u,v) fputs(u, stderr) -#else /* !defined(_USE_WRITE) */ -#include <unistd.h> /* write */ -#define WRITE2(u,v) write(2, u, v) -#undef fflush -#endif /* !defined(_USE_WRITE) */ +#if LIBM_SVID_COMPAT + +# ifndef _USE_WRITE +# include <stdio.h> /* fputs(), stderr */ +# define WRITE2(u,v) fputs(u, stderr) +# else /* !defined(_USE_WRITE) */ +# include <unistd.h> /* write */ +# define WRITE2(u,v) write(2, u, v) +# undef fflush +# endif /* !defined(_USE_WRITE) */ /* XXX gcc versions until now don't delay the 0.0/0.0 division until runtime but produce NaN at compile time. This is wrong since the exceptions are not set correctly. */ -#if 0 +# if 0 static const double zero = 0.0; /* used as const */ -#else +# else static double zero = 0.0; /* used as const */ -#endif +# endif /* * Standard conformance (non-IEEE) on exception cases. @@ -97,21 +99,21 @@ double __kernel_standard(double x, double y, int type) { struct exception exc; -#ifndef HUGE_VAL /* this is the only routine that uses HUGE_VAL */ -#define HUGE_VAL inf +# ifndef HUGE_VAL /* this is the only routine that uses HUGE_VAL */ +# define HUGE_VAL inf double inf = 0.0; SET_HIGH_WORD(inf,0x7ff00000); /* set inf to infinite */ -#endif +# endif /* The SVID struct exception uses a field "char *name;". */ -#define CSTR(func) ((char *) (type < 100 \ +# define CSTR(func) ((char *) (type < 100 \ ? func \ : (type < 200 ? func "f" : func "l"))) -#ifdef _USE_WRITE +# ifdef _USE_WRITE (void) fflush(stdout); -#endif +# endif exc.arg1 = x; exc.arg2 = y; switch(type) { @@ -945,3 +947,4 @@ __kernel_standard(double x, double y, int type) } return exc.retval; } +#endif diff --git a/sysdeps/ieee754/k_standardf.c b/sysdeps/ieee754/k_standardf.c index 85b2003daf..62d25d22db 100644 --- a/sysdeps/ieee754/k_standardf.c +++ b/sysdeps/ieee754/k_standardf.c @@ -21,6 +21,7 @@ #include <math-svid-compat.h> +#if LIBM_SVID_COMPAT /* Handle errors for a libm function as specified by TYPE (see comments in k_standard.c for details), with arguments X and Y, returning the appropriate return value for that function. */ @@ -30,3 +31,4 @@ __kernel_standard_f (float x, float y, int type) { return __kernel_standard (x, y, type); } +#endif diff --git a/sysdeps/ieee754/k_standardl.c b/sysdeps/ieee754/k_standardl.c index 783fd0b87d..484ec91354 100644 --- a/sysdeps/ieee754/k_standardl.c +++ b/sysdeps/ieee754/k_standardl.c @@ -38,6 +38,8 @@ #include <errno.h> +#if LIBM_SVID_COMPAT + static double zero = 0.0; /* Handle errors for a libm function as specified by TYPE (see @@ -106,3 +108,4 @@ __kernel_standard_l (long double x, long double y, int type) return __kernel_standard (dx, dy, type); } } +#endif diff --git a/sysdeps/ieee754/ldbl-128/w_expl_compat.c b/sysdeps/ieee754/ldbl-128/w_expl_compat.c index e0fa9e3501..ec076deaad 100644 --- a/sysdeps/ieee754/ldbl-128/w_expl_compat.c +++ b/sysdeps/ieee754/ldbl-128/w_expl_compat.c @@ -26,18 +26,20 @@ static char rcsid[] = "$NetBSD: $"; #include <math_private.h> #include <math-svid-compat.h> +#if LIBM_SVID_COMPAT long double __expl(long double x) /* wrapper exp */ { -#ifdef _IEEE_LIBM +# ifdef _IEEE_LIBM return __ieee754_expl(x); -#else +# else long double z = __ieee754_expl (x); if (__glibc_unlikely (!isfinite (z) || z == 0) && isfinite (x) && _LIB_VERSION != _IEEE_) return __kernel_standard_l (x, x, 206 + !!signbit (x)); return z; -#endif +# endif } hidden_def (__expl) weak_alias (__expl, expl) +#endif diff --git a/sysdeps/ieee754/ldbl-128ibm/w_expl_compat.c b/sysdeps/ieee754/ldbl-128ibm/w_expl_compat.c index 019a48fb0d..53948a96e6 100644 --- a/sysdeps/ieee754/ldbl-128ibm/w_expl_compat.c +++ b/sysdeps/ieee754/ldbl-128ibm/w_expl_compat.c @@ -3,6 +3,7 @@ #include <math-svid-compat.h> #include <math_ldbl_opt.h> +#if LIBM_SVID_COMPAT long double __expl(long double x) /* wrapper exp */ { long double z; @@ -20,3 +21,4 @@ long double __expl(long double x) /* wrapper exp */ } hidden_def (__expl) long_double_symbol (libm, __expl, expl); +#endif diff --git a/sysdeps/ieee754/ldbl-64-128/w_expl_compat.c b/sysdeps/ieee754/ldbl-64-128/w_expl_compat.c index 37c153e2a4..037e8bf348 100644 --- a/sysdeps/ieee754/ldbl-64-128/w_expl_compat.c +++ b/sysdeps/ieee754/ldbl-64-128/w_expl_compat.c @@ -2,4 +2,6 @@ #undef weak_alias #define weak_alias(n,a) #include <sysdeps/ieee754/ldbl-128/w_expl_compat.c> +#if LIBM_SVID_COMPAT long_double_symbol (libm, __expl, expl); +#endif diff --git a/sysdeps/ieee754/ldbl-96/w_expl_compat.c b/sysdeps/ieee754/ldbl-96/w_expl_compat.c index c9e6003a43..ae9ab586cb 100644 --- a/sysdeps/ieee754/ldbl-96/w_expl_compat.c +++ b/sysdeps/ieee754/ldbl-96/w_expl_compat.c @@ -20,6 +20,7 @@ #include <math_private.h> #include <math-svid-compat.h> +#if LIBM_SVID_COMPAT /* wrapper expl */ long double __expl (long double x) @@ -33,3 +34,4 @@ __expl (long double x) } hidden_def (__expl) weak_alias (__expl, expl) +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_acoshl_compat.c b/sysdeps/ieee754/ldbl-opt/w_acoshl_compat.c index df4338d9fa..f66964a138 100644 --- a/sysdeps/ieee754/ldbl-opt/w_acoshl_compat.c +++ b/sysdeps/ieee754/ldbl-opt/w_acoshl_compat.c @@ -2,4 +2,6 @@ #undef weak_alias #define weak_alias(n,a) #include <math/w_acoshl_compat.c> +#if LIBM_SVID_COMPAT long_double_symbol (libm, __acoshl, acoshl); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_acosl_compat.c b/sysdeps/ieee754/ldbl-opt/w_acosl_compat.c index 5efc99024c..ff33e9a9ed 100644 --- a/sysdeps/ieee754/ldbl-opt/w_acosl_compat.c +++ b/sysdeps/ieee754/ldbl-opt/w_acosl_compat.c @@ -2,4 +2,6 @@ #undef weak_alias #define weak_alias(n,a) #include <math/w_acosl_compat.c> +#if LIBM_SVID_COMPAT long_double_symbol (libm, __acosl, acosl); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_asinl_compat.c b/sysdeps/ieee754/ldbl-opt/w_asinl_compat.c index 087fab25bb..a53f1cb1f5 100644 --- a/sysdeps/ieee754/ldbl-opt/w_asinl_compat.c +++ b/sysdeps/ieee754/ldbl-opt/w_asinl_compat.c @@ -2,4 +2,6 @@ #undef weak_alias #define weak_alias(n,a) #include <math/w_asinl_compat.c> +#if LIBM_SVID_COMPAT long_double_symbol (libm, __asinl, asinl); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_atan2l_compat.c b/sysdeps/ieee754/ldbl-opt/w_atan2l_compat.c index 6b12209625..c70f77e4c4 100644 --- a/sysdeps/ieee754/ldbl-opt/w_atan2l_compat.c +++ b/sysdeps/ieee754/ldbl-opt/w_atan2l_compat.c @@ -2,4 +2,6 @@ #undef weak_alias #define weak_alias(n,a) #include <math/w_atan2l_compat.c> +#if LIBM_SVID_COMPAT long_double_symbol (libm, __atan2l, atan2l); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_atanhl_compat.c b/sysdeps/ieee754/ldbl-opt/w_atanhl_compat.c index 49bae1ee8f..67450c5859 100644 --- a/sysdeps/ieee754/ldbl-opt/w_atanhl_compat.c +++ b/sysdeps/ieee754/ldbl-opt/w_atanhl_compat.c @@ -2,4 +2,6 @@ #undef weak_alias #define weak_alias(n,a) #include <math/w_atanhl_compat.c> +#if LIBM_SVID_COMPAT long_double_symbol (libm, __atanhl, atanhl); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_coshl_compat.c b/sysdeps/ieee754/ldbl-opt/w_coshl_compat.c index a8808778ba..392511bab6 100644 --- a/sysdeps/ieee754/ldbl-opt/w_coshl_compat.c +++ b/sysdeps/ieee754/ldbl-opt/w_coshl_compat.c @@ -2,4 +2,6 @@ #undef weak_alias #define weak_alias(n,a) #include <math/w_coshl_compat.c> +#if LIBM_SVID_COMPAT long_double_symbol (libm, __coshl, coshl); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_exp10l_compat.c b/sysdeps/ieee754/ldbl-opt/w_exp10l_compat.c index cf154882fe..5a52a75ba5 100644 --- a/sysdeps/ieee754/ldbl-opt/w_exp10l_compat.c +++ b/sysdeps/ieee754/ldbl-opt/w_exp10l_compat.c @@ -4,15 +4,17 @@ #undef compat_symbol #define compat_symbol(l,n,a,v) #include <math/w_exp10l_compat.c> +#if LIBM_SVID_COMPAT long_double_symbol (libm, __exp10l, exp10l); -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27) +# if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27) /* compat_symbol was undefined and redefined above to avoid the default pow10l compat symbol at version GLIBC_2_1 (as for ldbl-opt configurations, that version should have the alias to exp10). So it now needs to be redefined to define the compat symbol at version LONG_DOUBLE_COMPAT_VERSION. */ -# undef compat_symbol -# define compat_symbol(lib, local, symbol, version) \ +# undef compat_symbol +# define compat_symbol(lib, local, symbol, version) \ compat_symbol_reference (lib, local, symbol, version) compat_symbol (libm, __pow10l, pow10l, LONG_DOUBLE_COMPAT_VERSION); +# endif #endif diff --git a/sysdeps/ieee754/ldbl-opt/w_fmodl_compat.c b/sysdeps/ieee754/ldbl-opt/w_fmodl_compat.c index 88fe0ac4d2..12419e3060 100644 --- a/sysdeps/ieee754/ldbl-opt/w_fmodl_compat.c +++ b/sysdeps/ieee754/ldbl-opt/w_fmodl_compat.c @@ -2,4 +2,6 @@ #undef weak_alias #define weak_alias(n,a) #include <math/w_fmodl_compat.c> +#if LIBM_SVID_COMPAT long_double_symbol (libm, __fmodl, fmodl); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_hypotl_compat.c b/sysdeps/ieee754/ldbl-opt/w_hypotl_compat.c index 68e3997489..b87bac7ce8 100644 --- a/sysdeps/ieee754/ldbl-opt/w_hypotl_compat.c +++ b/sysdeps/ieee754/ldbl-opt/w_hypotl_compat.c @@ -2,4 +2,6 @@ #undef weak_alias #define weak_alias(n,a) #include <math/w_hypotl_compat.c> +#if LIBM_SVID_COMPAT long_double_symbol (libm, __hypotl, hypotl); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_j0l_compat.c b/sysdeps/ieee754/ldbl-opt/w_j0l_compat.c index 9050657e03..8fc865128d 100644 --- a/sysdeps/ieee754/ldbl-opt/w_j0l_compat.c +++ b/sysdeps/ieee754/ldbl-opt/w_j0l_compat.c @@ -2,5 +2,7 @@ #undef weak_alias #define weak_alias(n,a) #include <math/w_j0l_compat.c> +#if LIBM_SVID_COMPAT long_double_symbol (libm, __j0l, j0l); long_double_symbol (libm, __y0l, y0l); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_j1l_compat.c b/sysdeps/ieee754/ldbl-opt/w_j1l_compat.c index 4ed9e2dd12..85b3feed9f 100644 --- a/sysdeps/ieee754/ldbl-opt/w_j1l_compat.c +++ b/sysdeps/ieee754/ldbl-opt/w_j1l_compat.c @@ -2,5 +2,7 @@ #undef weak_alias #define weak_alias(n,a) #include <math/w_j1l_compat.c> +#if LIBM_SVID_COMPAT long_double_symbol (libm, __j1l, j1l); long_double_symbol (libm, __y1l, y1l); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_jnl_compat.c b/sysdeps/ieee754/ldbl-opt/w_jnl_compat.c index d22ee54997..9b2c998536 100644 --- a/sysdeps/ieee754/ldbl-opt/w_jnl_compat.c +++ b/sysdeps/ieee754/ldbl-opt/w_jnl_compat.c @@ -2,5 +2,7 @@ #undef weak_alias #define weak_alias(n,a) #include <math/w_jnl_compat.c> +#if LIBM_SVID_COMPAT long_double_symbol (libm, __jnl, jnl); long_double_symbol (libm, __ynl, ynl); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_lgammal_r_compat.c b/sysdeps/ieee754/ldbl-opt/w_lgammal_r_compat.c index 6fdf2bba87..431aa5d15c 100644 --- a/sysdeps/ieee754/ldbl-opt/w_lgammal_r_compat.c +++ b/sysdeps/ieee754/ldbl-opt/w_lgammal_r_compat.c @@ -2,4 +2,6 @@ #undef weak_alias #define weak_alias(n,a) #include <math/w_lgammal_r_compat.c> +#if LIBM_SVID_COMPAT long_double_symbol (libm, __lgammal_r, lgammal_r); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_log10l_compat.c b/sysdeps/ieee754/ldbl-opt/w_log10l_compat.c index 17de3e7856..6eb9ea7928 100644 --- a/sysdeps/ieee754/ldbl-opt/w_log10l_compat.c +++ b/sysdeps/ieee754/ldbl-opt/w_log10l_compat.c @@ -2,4 +2,6 @@ #undef weak_alias #define weak_alias(n,a) #include <math/w_log10l_compat.c> +#if LIBM_SVID_COMPAT long_double_symbol (libm, __log10l, log10l); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_log2l_compat.c b/sysdeps/ieee754/ldbl-opt/w_log2l_compat.c index 3c5e734573..1507e937b8 100644 --- a/sysdeps/ieee754/ldbl-opt/w_log2l_compat.c +++ b/sysdeps/ieee754/ldbl-opt/w_log2l_compat.c @@ -2,4 +2,6 @@ #undef weak_alias #define weak_alias(n,a) #include <math/w_log2l_compat.c> +#if LIBM_SVID_COMPAT long_double_symbol (libm, __log2l, log2l); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_logl_compat.c b/sysdeps/ieee754/ldbl-opt/w_logl_compat.c index 2b55842139..6b71ef2659 100644 --- a/sysdeps/ieee754/ldbl-opt/w_logl_compat.c +++ b/sysdeps/ieee754/ldbl-opt/w_logl_compat.c @@ -2,4 +2,6 @@ #undef weak_alias #define weak_alias(n,a) #include <math/w_logl_compat.c> +#if LIBM_SVID_COMPAT long_double_symbol (libm, __logl, logl); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_powl_compat.c b/sysdeps/ieee754/ldbl-opt/w_powl_compat.c index 1897cf1c63..c6f8d859be 100644 --- a/sysdeps/ieee754/ldbl-opt/w_powl_compat.c +++ b/sysdeps/ieee754/ldbl-opt/w_powl_compat.c @@ -2,4 +2,6 @@ #undef weak_alias #define weak_alias(n,a) #include <math/w_powl_compat.c> +#if LIBM_SVID_COMPAT long_double_symbol (libm, __powl, powl); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c b/sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c index b2ce5c9563..849d2db425 100644 --- a/sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c +++ b/sysdeps/ieee754/ldbl-opt/w_remainderl_compat.c @@ -2,6 +2,8 @@ #undef weak_alias #define weak_alias(n,a) #include <math/w_remainderl_compat.c> +#if LIBM_SVID_COMPAT long_double_symbol (libm, __remainderl, remainderl); strong_alias (__remainderl, __dreml) long_double_symbol (libm, __dreml, dreml); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_sinhl_compat.c b/sysdeps/ieee754/ldbl-opt/w_sinhl_compat.c index 305ed82357..8fce55c74f 100644 --- a/sysdeps/ieee754/ldbl-opt/w_sinhl_compat.c +++ b/sysdeps/ieee754/ldbl-opt/w_sinhl_compat.c @@ -2,4 +2,6 @@ #undef weak_alias #define weak_alias(n,a) #include <math/w_sinhl_compat.c> +#if LIBM_SVID_COMPAT long_double_symbol (libm, __sinhl, sinhl); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_sqrtl_compat.c b/sysdeps/ieee754/ldbl-opt/w_sqrtl_compat.c index 1e4526f2c6..05be917772 100644 --- a/sysdeps/ieee754/ldbl-opt/w_sqrtl_compat.c +++ b/sysdeps/ieee754/ldbl-opt/w_sqrtl_compat.c @@ -2,4 +2,6 @@ #undef weak_alias #define weak_alias(n,a) #include <math/w_sqrtl_compat.c> +#if LIBM_SVID_COMPAT long_double_symbol (libm, __sqrtl, sqrtl); +#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_tgammal_compat.c b/sysdeps/ieee754/ldbl-opt/w_tgammal_compat.c index aaf5403522..8c201ca8e2 100644 --- a/sysdeps/ieee754/ldbl-opt/w_tgammal_compat.c +++ b/sysdeps/ieee754/ldbl-opt/w_tgammal_compat.c @@ -2,4 +2,6 @@ #undef weak_alias #define weak_alias(n,a) #include <math/w_tgammal_compat.c> +#if LIBM_SVID_COMPAT long_double_symbol (libm, __tgammal, tgammal); +#endif |