diff options
author | bde <bde@FreeBSD.org> | 2008-02-13 16:56:52 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 2008-02-13 16:56:52 +0000 |
commit | 234b4ba1f790ab935917135503b97dbcd498be15 (patch) | |
tree | 7b48b9d5960e126db85b3634be4c08899795dfa3 /lib | |
parent | d212ebbda30867538fadac723d8c000c81f5ad4e (diff) | |
download | FreeBSD-src-234b4ba1f790ab935917135503b97dbcd498be15.zip FreeBSD-src-234b4ba1f790ab935917135503b97dbcd498be15.tar.gz |
On arches where long double is the same as double, alias ceil(), floor()
and trunc() to the corresponding long double functions. This is not
just an optimization for these arches. The full long double functions
have a wrong value for `huge', and the arches without full long doubles
depended on it being wrong.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/msun/Makefile | 13 | ||||
-rw-r--r-- | lib/msun/src/s_ceill.c | 4 | ||||
-rw-r--r-- | lib/msun/src/s_floorl.c | 4 | ||||
-rw-r--r-- | lib/msun/src/s_truncl.c | 4 |
4 files changed, 19 insertions, 6 deletions
diff --git a/lib/msun/Makefile b/lib/msun/Makefile index beb310d..4d4df2d 100644 --- a/lib/msun/Makefile +++ b/lib/msun/Makefile @@ -46,12 +46,12 @@ COMMON_SRCS= b_exp.c b_log.c b_tgamma.c \ k_cos.c k_cosf.c k_rem_pio2.c k_sin.c k_sinf.c \ k_tan.c k_tanf.c \ s_asinh.c s_asinhf.c s_atan.c s_atanf.c s_carg.c s_cargf.c \ - s_cbrt.c s_cbrtf.c s_ceil.c s_ceilf.c s_ceill.c \ + s_cbrt.c s_cbrtf.c s_ceil.c s_ceilf.c \ s_copysign.c s_copysignf.c s_cos.c s_cosf.c \ s_csqrt.c s_csqrtf.c s_erf.c s_erff.c \ s_exp2.c s_exp2f.c s_expm1.c s_expm1f.c s_fabsf.c s_fdim.c \ s_finite.c s_finitef.c \ - s_floor.c s_floorf.c s_floorl.c s_fma.c s_fmaf.c \ + s_floor.c s_floorf.c s_fma.c s_fmaf.c \ s_fmax.c s_fmaxf.c s_fmaxl.c s_fmin.c \ s_fminf.c s_fminl.c s_frexp.c s_frexpf.c s_ilogb.c s_ilogbf.c \ s_ilogbl.c s_isfinite.c s_isnan.c s_isnormal.c \ @@ -62,8 +62,8 @@ COMMON_SRCS= b_exp.c b_log.c b_tgamma.c \ s_nexttowardf.c s_remquo.c s_remquof.c \ s_rint.c s_rintf.c s_round.c s_roundf.c s_roundl.c \ s_scalbln.c s_scalbn.c s_scalbnf.c s_signbit.c \ - s_signgam.c s_significand.c s_significandf.c s_sin.c s_sinf.c s_tan.c \ - s_tanf.c s_tanh.c s_tanhf.c s_trunc.c s_truncf.c s_truncl.c \ + s_signgam.c s_significand.c s_significandf.c s_sin.c s_sinf.c \ + s_tan.c s_tanf.c s_tanh.c s_tanhf.c s_trunc.c s_truncf.c \ w_cabs.c w_cabsf.c w_drem.c w_dremf.c # Location of fpmath.h and _fpmath.h @@ -78,8 +78,9 @@ SYMBOL_MAPS= ${SYM_MAPS} COMMON_SRCS+= s_copysignl.c s_fabsl.c s_llrintl.c s_lrintl.c s_modfl.c .if ${LDBL_PREC} != 53 # If long double != double use these; otherwise, we alias the double versions. -COMMON_SRCS+= s_exp2l.c s_fmal.c s_frexpl.c s_logbl.c s_nanl.c \ - s_nextafterl.c s_nexttoward.c s_rintl.c s_scalbnl.c +COMMON_SRCS+= s_ceill.c s_exp2l.c s_floorl.c s_fmal.c s_frexpl.c \ + s_logbl.c s_nanl.c s_nextafterl.c s_nexttoward.c s_rintl.c \ + s_scalbnl.c s_truncl.c .endif # C99 complex functions diff --git a/lib/msun/src/s_ceill.c b/lib/msun/src/s_ceill.c index df26e5a..629c516 100644 --- a/lib/msun/src/s_ceill.c +++ b/lib/msun/src/s_ceill.c @@ -100,3 +100,7 @@ ceill(long double x) } return (u.e); } + +#if LDBL_MANT_DIG == 53 +__weak_reference(ceil, ceill); +#endif diff --git a/lib/msun/src/s_floorl.c b/lib/msun/src/s_floorl.c index 9dd13b6..1e0439f 100644 --- a/lib/msun/src/s_floorl.c +++ b/lib/msun/src/s_floorl.c @@ -100,3 +100,7 @@ floorl(long double x) } return (u.e); } + +#if LDBL_MANT_DIG == 53 +__weak_reference(floor, floorl); +#endif diff --git a/lib/msun/src/s_truncl.c b/lib/msun/src/s_truncl.c index 173b9ff..85ca814 100644 --- a/lib/msun/src/s_truncl.c +++ b/lib/msun/src/s_truncl.c @@ -67,3 +67,7 @@ truncl(long double x) } return (u.e); } + +#if LDBL_MANT_DIG == 53 +__weak_reference(trunc, truncl); +#endif |