diff options
-rw-r--r-- | hints/os390.sh | 6 | ||||
-rw-r--r-- | hints/posix-bc.sh | 3 | ||||
-rw-r--r-- | hints/uts.sh | 2 | ||||
-rw-r--r-- | numeric.c | 14 | ||||
-rw-r--r-- | perl.h | 8 |
5 files changed, 10 insertions, 23 deletions
diff --git a/hints/os390.sh b/hints/os390.sh index 4f6f370328..4eff5a8217 100644 --- a/hints/os390.sh +++ b/hints/os390.sh @@ -25,8 +25,6 @@ case "$ld" in 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 @@ esac # -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. diff --git a/hints/posix-bc.sh b/hints/posix-bc.sh index f844525a75..a7d3d2c4ab 100644 --- a/hints/posix-bc.sh +++ b/hints/posix-bc.sh @@ -19,9 +19,8 @@ esac # -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 diff --git a/hints/uts.sh b/hints/uts.sh index 74bedbda06..eb0d78ce11 100644 --- a/hints/uts.sh +++ b/hints/uts.sh @@ -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' @@ -572,24 +572,12 @@ S_mulexp10(NV value, I32 exponent) 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; @@ -1754,10 +1754,12 @@ typedef struct ptr_tbl PTR_TBL_t; # 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 |