This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove VOS floating-point workaround; VOS bug long since fixed
[perl5.git] / pp_pack.c
index cc1e637..eaeec89 100644 (file)
--- a/pp_pack.c
+++ b/pp_pack.c
@@ -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);
            }