X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl.h;h=8f1cad367ef8c6e388023f7a70766b846fe63125;hb=40b7a5f5e789eb31046d021a15e48b502ad8e1e9;hp=4c82ca7d56fd3c931087a92c95b28d3f7369d3d9;hpb=2986a63f7e513cf37f46db9f211b77071260031f;p=p5sagit%2Fp5-mst-13.2.git diff --git a/perl.h b/perl.h index 4c82ca7..8f1cad3 100644 --- a/perl.h +++ b/perl.h @@ -1131,23 +1131,9 @@ typedef UVTYPE UV; # endif #endif -/* - I've tracked down a weird bug in Perl5.6.1 to the UTS compiler's - mishandling of MY_UV_MAX in util.c. It is defined as - #ifndef MY_UV_MAX - # define MY_UV_MAX ((UV)IV_MAX * (UV)2 + (UV)1) - #endif - The compiler handles {double floating point value} >= MY_UV_MAX as if - MY_UV_MAX were the signed integer -1. In fact it will do the same - thing with (UV)(0xffffffff), in place of MY_UV_MAX, though 0xffffffff - *without* the typecast to UV works fine. - - hom00@utsglobal.com (Hal Morris) 2001-05-02 - - */ - -#ifdef UTS -# define MY_UV_MAX 0xffffffff +#if defined(uts) || defined(UTS) +# undef UV_MAX +# define UV_MAX (4294967295u) #endif #define IV_DIG (BIT_DIGITS(IVSIZE * 8)) @@ -1752,6 +1738,22 @@ typedef struct ptr_tbl PTR_TBL_t; # define NEED_ENVIRON_DUP_FOR_MODIFY #endif +/* + * initialise to avoid floating-point exceptions from overflow, etc + */ +#ifndef PERL_FPU_INIT +# ifdef HAS_FPSETMASK +# if HAS_FLOATINGPOINT_H +# include +# 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 +# endif +#endif + #ifndef PERL_SYS_INIT3 # define PERL_SYS_INIT3(argvp,argcp,envp) PERL_SYS_INIT(argvp,argcp) #endif @@ -3508,6 +3510,7 @@ typedef struct am_table_short AMTS; #define RESTORE_NUMERIC_LOCAL() /**/ #define RESTORE_NUMERIC_STANDARD() /**/ #define Atof Perl_atof +#define IN_LOCALE_RUNTIME 0 #endif /* !USE_LOCALE_NUMERIC */ @@ -3824,6 +3827,8 @@ extern void moncontrol(int); USE_REENTRANT_API + HAS_NL_LANGINFO + so that Configure picks them up. */ #endif /* Include guard */