In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/8a00eddcbace6ea4d95ca7780e8ec310ce6feb88?hp=d81c2d6ac7251c7a671bffcafe3dbcf20a83bb8a>
- Log ----------------------------------------------------------------- commit 8a00eddcbace6ea4d95ca7780e8ec310ce6feb88 Author: Jarkko Hietaniemi <[email protected]> Date: Wed Sep 3 18:45:29 2014 -0400 POSIX math: have the Perl_func wrappers for the C89 math, too. (Until now the non-long-double versions have been called on long doubles.) M ext/POSIX/POSIX.xs M perl.h commit d5799f3745fe9f6bac246d6215e2217acaf888c8 Author: Jarkko Hietaniemi <[email protected]> Date: Wed Sep 3 18:32:34 2014 -0400 POSIX math: c99_erfc, not plain erfc. M ext/POSIX/POSIX.xs ----------------------------------------------------------------------- Summary of changes: ext/POSIX/POSIX.xs | 22 +++++++++++----------- perl.h | 16 ++++++++++++++++ 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index 2c36823..62393eb 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -1828,7 +1828,7 @@ acos(x) RETVAL = NV_NAN; switch (ix) { case 0: - RETVAL = acos(x); /* C89 math */ + RETVAL = Perl_acos(x); /* C89 math */ break; case 1: #ifdef c99_acosh @@ -1838,7 +1838,7 @@ acos(x) #endif break; case 2: - RETVAL = asin(x); /* C89 math */ + RETVAL = Perl_asin(x); /* C89 math */ break; case 3: #ifdef c99_asinh @@ -1848,7 +1848,7 @@ acos(x) #endif break; case 4: - RETVAL = atan(x); /* C89 math */ + RETVAL = Perl_atan(x); /* C89 math */ break; case 5: #ifdef c99_atanh @@ -1865,10 +1865,10 @@ acos(x) #endif break; case 7: - RETVAL = ceil(x); /* C89 math */ + RETVAL = Perl_ceil(x); /* C89 math */ break; case 8: - RETVAL = cosh(x); /* C89 math */ + RETVAL = Perl_cosh(x); /* C89 math */ break; case 9: #ifdef c99_erf @@ -1879,7 +1879,7 @@ acos(x) break; case 10: #ifdef c99_erfc - RETVAL = erfc(x); + RETVAL = c99_erfc(x); #else not_here("erfc"); #endif @@ -1899,7 +1899,7 @@ acos(x) #endif break; case 13: - RETVAL = floor(x); /* C89 math */ + RETVAL = Perl_floor(x); /* C89 math */ break; case 14: #ifdef bessel_j0 @@ -1971,13 +1971,13 @@ acos(x) #endif break; case 24: - RETVAL = sinh(x); /* C89 math */ + RETVAL = Perl_sinh(x); /* C89 math */ break; case 25: - RETVAL = tan(x); /* C89 math */ + RETVAL = Perl_tan(x); /* C89 math */ break; case 26: - RETVAL = tanh(x); /* C89 math */ + RETVAL = Perl_tanh(x); /* C89 math */ break; case 27: /* XXX tgamma_r -- the lgamma accesses a global variable (signgam), @@ -2151,7 +2151,7 @@ copysign(x,y) #endif break; case 4: - RETVAL = fmod(x, y); /* C89 math */ + RETVAL = Perl_fmod(x, y); /* C89 math */ break; case 5: #ifdef c99_hypot diff --git a/perl.h b/perl.h index f251be3..54a880e 100644 --- a/perl.h +++ b/perl.h @@ -1894,6 +1894,14 @@ typedef NVTYPE NV; # define Perl_floor floorl # define Perl_ceil ceill # define Perl_fmod fmodl +# define Perl_acos acosl +# define Perl_asin asinl +# define Perl_atan atanl +# define Perl_cosh coshl +# define Perl_log10 log10l +# define Perl_sinh sinhl +# define Perl_tan tanl +# define Perl_tanh tanhl # endif /* e.g. libsunmath doesn't have modfl and frexpl as of mid-March 2000 */ # ifdef HAS_MODFL @@ -1992,6 +2000,14 @@ EXTERN_C long double modfl(long double, long double *); # define Perl_modf(x,y) modf(x,y) # define Perl_frexp(x,y) frexp(x,y) # define Perl_ldexp(x,y) ldexp(x,y) +# define Perl_acos acos +# define Perl_asin asin +# define Perl_atan atan +# define Perl_cosh cosh +# define Perl_log10 log10 +# define Perl_sinh sinh +# define Perl_tan tan +# define Perl_tanh tanh # ifndef Perl_isnan # ifdef HAS_ISNAN # define Perl_isnan(x) isnan(x) -- Perl5 Master Repository
