Change 11608 by jhi@alpha on 2001/08/07 23:35:27
Ignore SIGFPE everywhere.
Affected files ...
... //depot/perl/hints/os390.sh#15 edit
... //depot/perl/hints/posix-bc.sh#9 edit
... //depot/perl/hints/uts.sh#22 edit
... //depot/perl/numeric.c#9 edit
... //depot/perl/perl.h#375 edit
Differences ...
==== //depot/perl/hints/os390.sh#15 (text) ====
Index: perl/hints/os390.sh
--- perl/hints/os390.sh.~1~ Tue Aug 7 17:45:05 2001
+++ perl/hints/os390.sh Tue Aug 7 17:45:05 2001
@@ -25,8 +25,6 @@
esac
# -DMAXSIG=38 maximum signal number
-# -DPERL_IGNORE_FPUSIG=SIGFPE allows Perl to be cavalier with FP overflow
-# (particularly in numeric.c:S_mulexp10())
# -DOEMVS is used in place of #ifdef __MVS__ in certain places.
# -D_OE_SOCKETS alters system headers.
# -D_XOPEN_SOURCE_EXTENDEDA alters system headers.
@@ -35,8 +33,8 @@
# -DEBCDIC should come from Configure and need not be mentioned here.
# Prepend your favorites with Configure -Dccflags=your_favorites
case "$ccflags" in
-'') ccflags='-DMAXSIG=38 -DPERL_IGNORE_FPUSIG=SIGFPE -DOEMVS -D_OE_SOCKETS
-D_XOPEN_SOURCE_EXTENDED -D_ALL_SOURCE -DYYDYNAMIC' ;;
-*) ccflags="$ccflags -DMAXSIG=38 -DPERL_IGNORE_FPUSIG=SIGFPE -DOEMVS -D_OE_SOCKETS
-D_XOPEN_SOURCE_EXTENDED -D_ALL_SOURCE -DYYDYNAMIC" ;;
+'') ccflags='-DMAXSIG=38 -DOEMVS -D_OE_SOCKETS -D_XOPEN_SOURCE_EXTENDED -D_ALL_SOURCE
+-DYYDYNAMIC' ;;
+*) ccflags="$ccflags -DMAXSIG=38 -DOEMVS -D_OE_SOCKETS -D_XOPEN_SOURCE_EXTENDED
+-D_ALL_SOURCE -DYYDYNAMIC" ;;
esac
# Turning on optimization breaks perl.
==== //depot/perl/hints/posix-bc.sh#9 (text) ====
Index: perl/hints/posix-bc.sh
--- perl/hints/posix-bc.sh.~1~ Tue Aug 7 17:45:05 2001
+++ perl/hints/posix-bc.sh Tue Aug 7 17:45:05 2001
@@ -19,9 +19,8 @@
# -DPOSIX_BC
# -DUSE_PURE_BISON
# -D_XOPEN_SOURCE_EXTENDED alters system headers.
-# -DPERL_IGNORE_FPUSIG=SIGFPE
# Prepend your favorites with Configure -Dccflags=your_favorites
-ccflags="$ccflags -Kenum_long,llm_case_lower,llm_keep,no_integer_overflow -DPOSIX_BC
-DUSE_PURE_BISON -D_XOPEN_SOURCE_EXTENDED -DPERL_IGNORE_FPUSIG=SIGFPE"
+ccflags="$ccflags -Kenum_long,llm_case_lower,llm_keep,no_integer_overflow -DPOSIX_BC
+-DUSE_PURE_BISON -D_XOPEN_SOURCE_EXTENDED"
# ccdlflags have yet to be determined.
#case "$ccdlflags" in
==== //depot/perl/hints/uts.sh#22 (text) ====
Index: perl/hints/uts.sh
--- perl/hints/uts.sh.~1~ Tue Aug 7 17:45:05 2001
+++ perl/hints/uts.sh Tue Aug 7 17:45:05 2001
@@ -1,7 +1,7 @@
archname='s390'
archobjs='uts/strtol_wrap.o uts/sprintf_wrap.o'
cc='cc -Xa'
-ccflags='-XTSTRINGS=1500000 -DStrtol=strtol_wrap32 -DStrtoul=strtoul_wrap32
-DPERL_IGNORE_FPUSIG=SIGFPE -DSPRINTF_E_BUG'
+ccflags='-XTSTRINGS=1500000 -DStrtol=strtol_wrap32 -DStrtoul=strtoul_wrap32
+-DSPRINTF_E_BUG'
cccdlflags='-pic'
d_bincompat3='undef'
d_csh='undef'
==== //depot/perl/numeric.c#9 (text) ====
Index: perl/numeric.c
--- perl/numeric.c.~1~ Tue Aug 7 17:45:05 2001
+++ perl/numeric.c Tue Aug 7 17:45:05 2001
@@ -572,24 +572,12 @@
negative = 1;
exponent = -exponent;
}
-#ifdef __VAX /* avoid %SYSTEM-F-FLTOVF_F sans VAXC$ESTABLISH */
-# if defined(__DECC_VER) && __DECC_VER <= 50390006
- /* __F_FLT_MAX_10_EXP - 5 == 33 */
- if (!negative &&
- (log10(value) + exponent) >= (__F_FLT_MAX_10_EXP - 5))
- return NV_MAX;
-# endif
-#endif
-#if defined(__alpha) && defined(__unix__)
- if (!negative &&
- (log10(value) + exponent) >= (DBL_MAX_10_EXP))
- return NV_INF;
-#endif
for (bit = 1; exponent; bit <<= 1) {
if (exponent & bit) {
exponent ^= bit;
result *= power;
}
+ /* Floating point exceptions are supposed to be turned off. */
power *= power;
}
return negative ? value / result : value * result;
==== //depot/perl/perl.h#375 (text) ====
Index: perl/perl.h
--- perl/perl.h.~1~ Tue Aug 7 17:45:05 2001
+++ perl/perl.h Tue Aug 7 17:45:05 2001
@@ -1754,10 +1754,12 @@
# include <floatingpoint.h>
# endif
# define PERL_FPU_INIT fpsetmask(0);
-# elif PERL_IGNORE_FPUSIG
-# define PERL_FPU_INIT signal(PERL_IGNORE_FPUSIG, SIG_IGN);
# else
-# define PERL_FPU_INIT
+# if defined(SIGFPE) && defined(SIG_IGN)
+# define PERL_FPU_INIT signal(SIGFPE, SIG_IGN);
+# else
+# define PERL_FPU_INIT
+# endif
# endif
#endif
End of Patch.