diff options
author | Paul Green <Paul.Green@stratus.com> | 2013-03-17 11:35:47 -0400 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2013-03-19 15:45:45 -0600 |
commit | e16ef93a4d961f1d11955a3a3a81c4bc8fffadd1 (patch) | |
tree | 08872cc529cb175494729c1d9c547825a4e0bbed /pp_pack.c | |
parent | 48cbae4fa8ee5b0b6d3dd7b18e27cdf83db0f0c0 (diff) | |
download | perl-e16ef93a4d961f1d11955a3a3a81c4bc8fffadd1.tar.gz |
Remove VOS floating-point workaround; VOS bug long since fixed
Diffstat (limited to 'pp_pack.c')
-rw-r--r-- | pp_pack.c | 34 |
1 files changed, 0 insertions, 34 deletions
@@ -3101,22 +3101,6 @@ S_pack_rec(pTHX_ SV *cat, tempsym_t* symptr, SV **beglist, SV **endlist ) NV anv; fromstr = NEXTFROM; anv = SvNV(fromstr); -#ifdef __VOS__ - /* VOS does not automatically map a floating-point overflow - during conversion from double to float into infinity, so we - do it by hand. This code should either be generalized for - any OS that needs it, or removed if and when VOS implements - posix-976 (suggestion to support mapping to infinity). - Paul.Green@stratus.com 02-04-02. */ -{ -extern const float _float_constants[]; - if (anv > FLT_MAX) - afloat = _float_constants[0]; /* single prec. inf. */ - else if (anv < -FLT_MAX) - afloat = _float_constants[0]; /* single prec. inf. */ - else afloat = (float) anv; -} -#else /* __VOS__ */ # if defined(VMS) && !defined(_IEEE_FP) /* IEEE fp overflow shenanigans are unavailable on VAX and optional * on Alpha; fake it if we don't have them. @@ -3129,7 +3113,6 @@ extern const float _float_constants[]; # else afloat = (float)anv; # endif -#endif /* __VOS__ */ DO_BO_PACK_N(afloat, float); PUSH_VAR(utf8, cur, afloat); } @@ -3140,22 +3123,6 @@ extern const float _float_constants[]; NV anv; fromstr = NEXTFROM; anv = SvNV(fromstr); -#ifdef __VOS__ - /* VOS does not automatically map a floating-point overflow - during conversion from long double to double into infinity, - so we do it by hand. This code should either be generalized - for any OS that needs it, or removed if and when VOS - implements posix-976 (suggestion to support mapping to - infinity). Paul.Green@stratus.com 02-04-02. */ -{ -extern const double _double_constants[]; - if (anv > DBL_MAX) - adouble = _double_constants[0]; /* double prec. inf. */ - else if (anv < -DBL_MAX) - adouble = _double_constants[0]; /* double prec. inf. */ - else adouble = (double) anv; -} -#else /* __VOS__ */ # if defined(VMS) && !defined(_IEEE_FP) /* IEEE fp overflow shenanigans are unavailable on VAX and optional * on Alpha; fake it if we don't have them. @@ -3168,7 +3135,6 @@ extern const double _double_constants[]; # else adouble = (double)anv; # endif -#endif /* __VOS__ */ DO_BO_PACK_N(adouble, double); PUSH_VAR(utf8, cur, adouble); } |