In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/f41ee62e9d9e2e6909b863830aaeb4f1e06407e0?hp=f4de6fcdcabdf1364f83a3eced84f2b4e4cbd415>
- Log ----------------------------------------------------------------- commit f41ee62e9d9e2e6909b863830aaeb4f1e06407e0 Author: Craig A. Berry <[email protected]> Date: Fri Oct 28 22:02:37 2016 -0400 The new symbols broke a limit in VMS. M vms/munchconfig.c commit 85272d315820be85a9069783ae2be8878e1e42a4 Author: Jarkko Hietaniemi <[email protected]> Date: Thu Oct 27 07:46:22 2016 -0400 Use the new metalevel definitions for fp inf/nan/range There are still hacks (in a good sense) of detecting "vax float" in the cpan/ modules (patches submitted upstream, customized moves done), but that is fine since the new Config symbols will be available only in the future. M ext/POSIX/Makefile.PL M ext/POSIX/t/math.t M t/lib/warnings/9uninit M t/lib/warnings/pp_sys M t/op/hexfp.t M t/op/inc.t M t/op/infnan.t M t/op/pack.t M t/op/sprintf2.t M t/opbasic/arith.t M t/porting/globvar.t commit 4cb05021f1602b1c29295f791d76ba4b38426f2a Author: Jarkko Hietaniemi <[email protected]> Date: Mon Oct 24 22:07:46 2016 -0400 Configure: add defs summarizing doublekind/longdblkind For windows/netware It seems that many of the recent fp definitions have not been yet copied over there [1] [2], so went mostly by dead reckoning [3]. [1] Note that many of them are not absolutely necessary for building. [2] The proper updating involves doing stuff in win32, which I do not have. [3] As far as I can tell, Windows CE does not really not have long double. M Configure M Cross/config.sh-arm-linux M NetWare/config.wc M NetWare/config_H.wc M Porting/Glossary M Porting/config.sh M config_h.SH M configure.com M plan9/config_sh.sample M symbian/config.sh M uconfig.h M uconfig.sh M uconfig64.sh M win32/config.ce M win32/config.gc M win32/config.vc M win32/config_H.ce M win32/config_H.gc M win32/config_H.vc commit a8b2934d541975842b17146eaf9343dd439e5eca Author: Jarkko Hietaniemi <[email protected]> Date: Thu Oct 27 08:03:08 2016 -0400 netbsd-vax: 2**400 does not fit vax fp Note also that the computation needs to be runtime, not compiletime. M t/lib/warnings/utf8 commit 059d8568a141af07d90f38d161fc6ba4993d4467 Author: Jarkko Hietaniemi <[email protected]> Date: Mon Oct 24 18:31:57 2016 -0400 netbsd-vax: more skippage due to no inf/nan M t/lib/warnings/9uninit M t/lib/warnings/op M t/lib/warnings/pp_sys ----------------------------------------------------------------------- Summary of changes: Configure | 98 ++++++++++++++++++++++++++++++++++++++++++++++- Cross/config.sh-arm-linux | 13 +++++++ NetWare/config.wc | 13 +++++++ NetWare/config_H.wc | 41 ++++++++++++++++++++ Porting/Glossary | 56 +++++++++++++++++++++++++++ Porting/config.sh | 13 +++++++ config_h.SH | 69 +++++++++++++++++++++++++++++++++ configure.com | 42 ++++++++++++++++++++ ext/POSIX/Makefile.PL | 10 +++-- ext/POSIX/t/math.t | 28 ++++++++------ plan9/config_sh.sample | 13 +++++++ symbian/config.sh | 13 +++++++ t/lib/warnings/9uninit | 11 ++---- t/lib/warnings/op | 17 ++++++-- t/lib/warnings/pp_sys | 16 ++++++-- t/lib/warnings/utf8 | 9 ++++- t/op/hexfp.t | 3 +- t/op/inc.t | 8 ++-- t/op/infnan.t | 4 +- t/op/pack.t | 8 ++-- t/op/sprintf2.t | 12 ++---- t/opbasic/arith.t | 7 ++-- t/porting/globvar.t | 8 ++-- uconfig.h | 73 ++++++++++++++++++++++++++++++++++- uconfig.sh | 13 +++++++ uconfig64.sh | 13 +++++++ vms/munchconfig.c | 2 +- win32/config.ce | 13 +++++++ win32/config.gc | 13 +++++++ win32/config.vc | 13 +++++++ win32/config_H.ce | 26 +++++++++++++ win32/config_H.gc | 41 ++++++++++++++++++++ win32/config_H.vc | 41 ++++++++++++++++++++ 33 files changed, 692 insertions(+), 68 deletions(-) diff --git a/Configure b/Configure index a68b670..34dfc5f 100755 --- a/Configure +++ b/Configure @@ -438,6 +438,14 @@ d_dlerror='' d_dlopen='' d_dlsymun='' d_dosuid='' +d_double_has_inf='' +d_double_has_nan='' +d_double_has_negative_zero='' +d_double_has_subnormals='' +d_double_style_cray='' +d_double_style_ibm='' +d_double_style_ieee='' +d_double_style_vax='' d_suidsafe='' d_drand48_r='' drand48_r_proto='' @@ -636,6 +644,11 @@ d_log2='' d_logb='' d_ldexpl='' d_longdbl='' +d_long_double_style_ieee='' +d_long_double_style_ieee_doubledouble='' +d_long_double_style_ieee_extended='' +d_long_double_style_ieee_std='' +d_long_double_style_vax='' longdblkind='' longdblsize='' d_longlong='' @@ -7078,9 +7091,29 @@ case "$longdblkind" in 6) echo "You have 128-bit fully big-endian double-double long doubles (64-bit BEs in BE)." >& 4 ;; 7) echo "You have 128-bit mixed-endian double-double long doubles (64-bit LEs in BE)." >& 4 ;; 8) echo "You have 128-bit mixed-endian double-double long doubles (64-bit BEs in LE)." >& 4 ;; -9) echo "You have 128-bit PDP-style mixed-endian long doubles." >& 4 ;; +9) echo "You have 128-bit PDP-style mixed-endian long doubles (VAX format H)." >& 4 ;; *) echo "Cannot figure out your long double." >&4 ;; esac +d_long_double_style_ieee=$undef +d_long_double_style_ieee_std=$undef +d_long_double_style_ieee_extended=$undef +d_long_double_style_ieee_doubledouble=$undef +d_long_double_style_vax=$undef +case "$longdblkind" in +1|2|3|4|5|6|7|8) d_long_double_style_ieee=$define ;; +esac +case "$longdblkind" in +1|2) d_long_double_style_ieee_std=$define ;; +esac +case "$longdblkind" in +3|4) d_long_double_style_ieee_extended=$define ;; +esac +case "$longdblkind" in +5|6|7|8) d_long_double_style_ieee_doubledouble=$define ;; +esac +case "$longdblkind" in +9) d_long_double_style_vax=$define ;; +esac $rm_try : determine the architecture name @@ -10254,6 +10287,30 @@ case "$doublekind" in 14) echo "You have Cray single 64-bit doubles." >&4 ;; *) echo "Cannot figure out your double. You Cyber, or something?" >&4 ;; esac +d_double_style_ieee=$undef +d_double_style_vax=$undef +d_double_style_ibm=$undef +d_double_style_cray=$undef +case "$doublekind" in +1|2|3|4|5|6|7|8) d_double_style_ieee=$define ;; +9|10|11) d_double_style_vax=$define ;; +12|13) d_double_style_ibm=$define ;; +14) double_style_cray=$define ;; +esac +case "$d_double_style_ieee" in +$define) + d_double_has_inf=$define + d_double_has_nan=$define + d_double_has_negative_zero=$define + d_double_has_subnormals=$define + ;; +*) + d_double_has_inf=$undef + d_double_has_nan=$undef + d_double_has_negative_zero=$undef + d_double_has_subnormals=$undef + ;; +esac $rm_try : Check print/scan long double stuff @@ -20592,6 +20649,11 @@ $cat >try.c <<EOP * 0x7f, 0xf4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 * (respectively) as opposed to the more usual * 0x7f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + * + * Pre-IEEE-754 floating point format do not even have inf/nan support + * at all. They might have a "max" value (DBL_MAX), which may be deadly + * to even mention, causing immediate SIGFPE or equivalent: this is + * the case with VAX floating point, for example. */ static void bytes(unsigned char *p, unsigned int n) { int i; @@ -20671,6 +20733,10 @@ else doubleinfbytes='0x00, 0x00, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00' doublenanbytes='0x00, 0x00, 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00' ;; + 9|10|11|12|13|14) # VAX/Cray/IBM floating point formats, no inf/nan. + doubleinfbytes=$undef + doublenanbytes=$undef + ;; *) # No idea. doubleinfbytes=$undef doublenanbytes=$undef @@ -20733,12 +20799,29 @@ else longdblinfbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00' longdblnanbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00' ;; + 9|10|11|12|13|14) # VAX/Cray/IBM floating point formats, no inf/nan. + longdblinfbytes=$undef + longdblnanbytes=$undef + ;; *) # No idea. longdblinfbytes=$undef longdblnanbytes=$undef ;; esac fi +# In case the program crashed the values are empty, turn them undef. +case "$dblinfbytes" in +'') dblinfbytes=$undef ;; +esac +case "$dblnanbytes" in +'') dblnanbytes=$undef ;; +esac +case "$ldblinfbytes" in +'') ldblinfbytes=$undef ;; +esac +case "$ldblnanbytes" in +'') ldblnanbytes=$undef ;; +esac $rm_try : Check the length of the double mantissa @@ -24357,6 +24440,14 @@ d_dlerror='$d_dlerror' d_dlopen='$d_dlopen' d_dlsymun='$d_dlsymun' d_dosuid='$d_dosuid' +d_double_has_inf='$d_double_has_inf' +d_double_has_nan='$d_double_has_nan' +d_double_has_negative_zero='$d_double_has_negative_zero' +d_double_has_subnormals='$d_double_has_subnormals' +d_double_style_cray='$d_double_style_cray' +d_double_style_ibm='$d_double_style_ibm' +d_double_style_ieee='$d_double_style_ieee' +d_double_style_vax='$d_double_style_vax' d_drand48_r='$d_drand48_r' d_drand48proto='$d_drand48proto' d_dup2='$d_dup2' @@ -24538,6 +24629,11 @@ d_log2='$d_log2' d_logb='$d_logb' d_longdbl='$d_longdbl' d_longlong='$d_longlong' +d_long_double_style_ieee='$d_long_double_style_ieee' +d_long_double_style_ieee_doubledouble='$d_long_double_style_ieee_doubledouble' +d_long_double_style_ieee_extended='$d_long_double_style_ieee_extended' +d_long_double_style_ieee_std='$d_long_double_style_ieee_std' +d_long_double_style_vax='$d_long_double_style_vax' d_lrint='$d_lrint' d_lrintl='$d_lrintl' d_lround='$d_lround' diff --git a/Cross/config.sh-arm-linux b/Cross/config.sh-arm-linux index 726cfd4..2626400 100644 --- a/Cross/config.sh-arm-linux +++ b/Cross/config.sh-arm-linux @@ -169,6 +169,14 @@ d_dlerror='define' d_dlopen='define' d_dlsymun='undef' d_dosuid='undef' +d_double_has_inf='define' +d_double_has_nan='define' +d_double_has_negative_zero='define' +d_double_has_subnormals='define' +d_double_style_cray='undef' +d_double_style_ibm='undef' +d_double_style_ieee='define' +d_double_style_vax='undef' d_drand48_r='undef' d_drand48proto='define' d_dup2='define' @@ -346,6 +354,11 @@ d_lockf='define' d_log1p='undef' d_log2='undef' d_logb='undef' +d_long_double_style_ieee='undef' +d_long_double_style_ieee_doubledouble='undef' +d_long_double_style_ieee_extended='undef' +d_long_double_style_ieee_std='undef' +d_long_double_style_vax='undef' d_longdbl='define' d_longlong='define' d_lrint='undef' diff --git a/NetWare/config.wc b/NetWare/config.wc index d61924e..176a865 100644 --- a/NetWare/config.wc +++ b/NetWare/config.wc @@ -156,6 +156,14 @@ d_dlerror='define' d_dlopen='define' d_dlsymun='undef' d_dosuid='undef' +d_double_has_inf='define' +d_double_has_nan='define' +d_double_has_negative_zero='define' +d_double_has_subnormals='define' +d_double_style_cray='undef' +d_double_style_ibm='undef' +d_double_style_ieee='define' +d_double_style_vax='undef' d_drand48_r='undef' d_drand48proto='undef' d_dup2='define' @@ -335,6 +343,11 @@ d_lockf='undef' d_log1p='undef' d_log2='undef' d_logb='undef' +d_long_double_style_ieee='undef' +d_long_double_style_ieee_doubledouble='undef' +d_long_double_style_ieee_extended='define' +d_long_double_style_ieee_std='undef' +d_long_double_style_vax='undef' d_longdbl='define' d_longlong='undef' d_lrint='undef' diff --git a/NetWare/config_H.wc b/NetWare/config_H.wc index a8343cf..cd625d8 100644 --- a/NetWare/config_H.wc +++ b/NetWare/config_H.wc @@ -2289,6 +2289,32 @@ */ #define DOUBLESIZE 8 /**/ +/* DOUBLE_STYLE_IEEE + * This symbol, if defined, indicates that the double is + * the 64-bit IEEE 754. + */ +/* DOUBLE_HAS_INF + * This symbol, if defined, indicates that the double has + * the infinity. + */ +/* DOUBLE_HAS_NAN + * This symbol, if defined, indicates that the double has + * the not-a-number. + */ +/* DOUBLE_HAS_NEGATIVE_ZERO + * This symbol, if defined, indicates that the double has + * the negative_zero. + */ +/* DOUBLE_HAS_SUBNORMALS + * This symbol, if defined, indicates that the double has + * the subnormals (denormals). + */ +#define DOUBLE_STYLE_IEEE +#define DOUBLE_HAS_INF +#define DOUBLE_HAS_INF +#define DOUBLE_HAS_NEGATIVE_ZERO +#define DOUBLE_HAS_SUBNORMALS + /* DOUBLEINFBYTES: * This symbol, if defined, is a comma-separated list of * hexadecimal bytes for the double precision infinity. @@ -2329,6 +2355,21 @@ */ #define LONGDBLMANTBITS 52 +/* LONG_DOUBLE_STYLE_IEEE + * This symbol, if defined, indicates that the long double + * is any of the IEEE 754 style long doubles: + * LONG_DOUBLE_STYLE_IEEE_STD, LONG_DOUBLE_STYLE_IEEE_EXTENDED, + * LONG_DOUBLE_STYLE_IEEE_DOUBLEDOUBLE. + */ +/* LONG_DOUBLE_STYLE_IEEE_EXTENDED + * This symbol, if defined, indicates that the long double is + * the 80-bit IEEE 754. Note that despite the 'extended' this + * is less than the 'std', since this is an extension of + * the double precision. + */ +#define LONG_DOUBLE_STYLE_IEEE +#define LONG_DOUBLE_STYLE_IEEE_EXTENDED + /* EBCDIC: * This symbol, if defined, indicates that this system uses * EBCDIC encoding. diff --git a/Porting/Glossary b/Porting/Glossary index 06b80a8..522d356 100644 --- a/Porting/Glossary +++ b/Porting/Glossary @@ -694,6 +694,38 @@ d_dlsymun (d_dlsymun.U): indicates that we need to prepend an underscore to the symbol name before calling dlsym(). +d_double_has_inf (infnan.U): + This variable conditionally defines the symbol DOUBLE_HAS_INF + which indicates that the double type has an infinity. + +d_double_has_nan (infnan.U): + This variable conditionally defines the symbol DOUBLE_HAS_INF + which indicates that the double type has a not-a-number. + +d_double_has_negative_zero (infnan.U): + This variable conditionally defines the symbol DOUBLE_HAS_NEGATIVE_ZERO + which indicates that the double type has a negative zero. + +d_double_has_subnormals (infnan.U): + This variable conditionally defines the symbol DOUBLE_HAS_SUBNORMALS + which indicates that the double type has subnormals (denormals). + +d_double_style_cray (longdblfio.U): + This variable conditionally defines the symbol DOUBLE_STYLE_CRAY + which indicates that the double is the 64-bit CRAY mainframe format. + +d_double_style_ibm (longdblfio.U): + This variable conditionally defines the symbol DOUBLE_STYLE_IBM, + which indicates that the double is the 64-bit IBM mainframe format. + +d_double_style_ieee (longdblfio.U): + This variable conditionally defines the symbol DOUBLE_STYLE_IEEE, + which indicates that the double is the 64-bit IEEE 754. + +d_double_style_vax (longdblfio.U): + This variable conditionally defines the symbol DOUBLE_STYLE_VAX, + which indicates that the double is the 64-bit VAX format D or G. + d_dosuid (d_dosuid.U): This variable conditionally defines the symbol DOSUID, which tells the C program that it should insert setuid emulation code @@ -1555,6 +1587,30 @@ d_longdbl (d_longdbl.U): This variable conditionally defines HAS_LONG_DOUBLE if the long double type is supported. +d_long_double_style_ieee (d_longdbl.U): + This variable conditionally defines LONG_DOUBLE_STYLE_IEEE + if the long double is any of the IEEE 754 style long doubles: + LONG_DOUBLE_STYLE_IEEE_STD, LONG_DOUBLE_STYLE_IEEE_EXTENDED, + LONG_DOUBLE_STYLE_IEEE_DOUBLEDOUBLE. + +d_long_double_style_ieee_doubledouble (d_longdbl.U): + This variable conditionally defines LONG_DOUBLE_STYLE_IEEE_DOUBLEDOUBLE + if the long double is the 128-bit IEEE 754 double-double. + +d_long_double_style_ieee_extended (d_longdbl.U): + This variable conditionally defines LONG_DOUBLE_STYLE_IEEE_EXTENDED + if the long double is the 80-bit IEEE 754 extended precision. + Note that despite the 'extended' this is less than the 'std', + since thisis an extension of the double precision. + +d_long_double_style_ieee_std (d_longdbl.U): + This variable conditionally defines LONG_DOUBLE_STYLE_IEEE_STD + if the long double is the 128-bit IEEE 754. + +d_long_double_style_vax (d_longdbl.U): + This variable conditionally defines LONG_DOUBLE_STYLE_VAX + if the long double is the 128-bit VAX format H. + d_longlong (d_longlong.U): This variable conditionally defines HAS_LONG_LONG if the long long type is supported. diff --git a/Porting/config.sh b/Porting/config.sh index 2838a4d..ff6a5fe 100644 --- a/Porting/config.sh +++ b/Porting/config.sh @@ -177,6 +177,14 @@ d_dlerror='define' d_dlopen='define' d_dlsymun='undef' d_dosuid='undef' +d_double_has_inf='define' +d_double_has_nan='define' +d_double_has_negative_zero='define' +d_double_has_subnormals='define' +d_double_style_cray='undef' +d_double_style_ibm='undef' +d_double_style_ieee='define' +d_double_style_vax='undef' d_drand48_r='undef' d_drand48proto='define' d_dup2='define' @@ -356,6 +364,11 @@ d_lockf='define' d_log1p='define' d_log2='define' d_logb='define' +d_long_double_style_ieee='undef' +d_long_double_style_ieee_doubledouble='undef' +d_long_double_style_ieee_extended='define' +d_long_double_style_ieee_std='undef' +d_long_double_style_vax='undef' d_longdbl='define' d_longlong='define' d_lrint='define' diff --git a/config_h.SH b/config_h.SH index fbf6d32..83ba0df 100755 --- a/config_h.SH +++ b/config_h.SH @@ -1946,6 +1946,30 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un * LONG_DOUBLE_IS_UNKNOWN_FORMAT * It is only defined if the system supports long doubles. */ +/* LONG_DOUBLE_STYLE_IEEE + * This symbol, if defined, indicates that the long double + * is any of the IEEE 754 style long doubles: + * LONG_DOUBLE_STYLE_IEEE_STD, LONG_DOUBLE_STYLE_IEEE_EXTENDED, + * LONG_DOUBLE_STYLE_IEEE_DOUBLEDOUBLE. + */ +/* LONG_DOUBLE_STYLE_IEEE_DOUBLEDOUBLE + * This symbol, if defined, indicates that the long double is + * the 128-bit double-double. + */ +/* LONG_DOUBLE_STYLE_IEEE_EXTENDED + * This symbol, if defined, indicates that the long double is + * the 80-bit IEEE 754. Note that despite the 'extended' this + * is less than the 'std', since this is an extension of + * the double precision. + */ +/* LONG_DOUBLE_STYLE_IEEE_STD + * This symbol, if defined, indicates that the long double is + * the 128-bit IEEE 754. + */ +/* LONG_DOUBLE_STYLE_VAX + * This symbol, if defined, indicates that the long double is + * the 128-bit VAX format H. + */ #$d_ldexpl HAS_LDEXPL /**/ #$d_longdbl HAS_LONG_DOUBLE /**/ #ifdef HAS_LONG_DOUBLE @@ -1964,6 +1988,11 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #define LONG_DOUBLE_IS_UNKNOWN_FORMAT -1 #define LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_LITTLE_ENDIAN LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_LE_LE /* back-compat */ #define LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_BIG_ENDIAN LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_BE_BE /* back-compat */ +#$d_long_double_style_ieee LONG_DOUBLE_STYLE_IEEE +#$d_long_double_style_ieee_doubledouble LONG_DOUBLE_STYLE_IEEE_DOUBLEDOUBLE +#$d_long_double_style_ieee_extended LONG_DOUBLE_STYLE_IEEE_EXTENDED +#$d_long_double_style_ieee_std LONG_DOUBLE_STYLE_IEEE_STD +#$d_long_double_style_vax LONG_DOUBLE_STYLE_VAX #endif /* HAS_LONG_LONG: @@ -3987,6 +4016,38 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un * DOUBLE_IS_CRAY_SINGLE_64_BIT * DOUBLE_IS_UNKNOWN_FORMAT */ +/* DOUBLE_HAS_INF + * This symbol, if defined, indicates that the double has + * the infinity. + */ +/* DOUBLE_HAS_NAN + * This symbol, if defined, indicates that the double has + * the not-a-number. + */ +/* DOUBLE_HAS_NEGATIVE_ZERO + * This symbol, if defined, indicates that the double has + * the negative_zero. + */ +/* DOUBLE_HAS_SUBNORMALS + * This symbol, if defined, indicates that the double has + * the subnormals (denormals). + */ +/* DOUBLE_STYLE_CRAY + * This symbol, if defined, indicates that the double is + * the 64-bit CRAY mainframe format. + */ +/* DOUBLE_STYLE_IBM + * This symbol, if defined, indicates that the double is + * the 64-bit IBM mainframe format. + */ +/* DOUBLE_STYLE_IEEE + * This symbol, if defined, indicates that the double is + * the 64-bit IEEE 754. + */ +/* DOUBLE_STYLE_VAX + * This symbol, if defined, indicates that the double is + * the 64-bit VAX format D or G. + */ #define DOUBLEKIND $doublekind /**/ #define DOUBLE_IS_IEEE_754_32_BIT_LITTLE_ENDIAN 1 #define DOUBLE_IS_IEEE_754_32_BIT_BIG_ENDIAN 2 @@ -4007,6 +4068,14 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_PRIgldbl PERL_PRIgldbl $sPRIgldbl /**/ #$d_PRIeldbl PERL_PRIeldbl $sPRIeldbl /**/ #$d_SCNfldbl PERL_SCNfldbl $sSCNfldbl /**/ +#$d_double_has_inf DOUBLE_HAS_INF +#$d_double_has_nan DOUBLE_HAS_INF +#$d_double_has_negative_zero DOUBLE_HAS_NEGATIVE_ZERO +#$d_double_has_subnormals DOUBLE_HAS_SUBNORMALS +#$d_double_style_cray DOUBLE_STYLE_CRAY +#$d_double_style_ibm DOUBLE_STYLE_IBM +#$d_double_style_ieee DOUBLE_STYLE_IEEE +#$d_double_style_vax DOUBLE_STYLE_VAX /* DOUBLEMANTBITS: * This symbol, if defined, tells how many mantissa bits diff --git a/configure.com b/configure.com index a886f6f..cb98892 100644 --- a/configure.com +++ b/configure.com @@ -3328,8 +3328,31 @@ $ d_ldexpl = "define" $ d_modfl = "define" $ d_modflproto = "define" $! +$ d_double_has_inf = "undef" +$ d_double_has_nan = "undef" +$ d_double_has_negative_zero = "undef" +$ d_double_has_subnormals = "undef" +$ d_double_style_cray = "undef" +$ d_double_style_ibm = "undef" +$ d_double_style_ieee = "undef" +$ d_double_style_vax = "undef" +$ d_long_double_style_ieee = "undef" +$ d_long_double_style_ieee_extended = "undef" +$ d_long_double_style_ieee_std = "undef" +$ d_long_double_style_vax = "undef" $ IF useieee .OR. useieee .EQS. "define" $ THEN +$ d_double_has_inf = "define" +$ d_double_has_nan = "define" +$ d_double_has_negative_zero = "define" +$ d_double_has_subnormals = "define" +$ d_double_style_ieee = "define" +$ IF uselongdouble .OR. uselongdouble .EQS. "define" +$ THEN +$ d_long_double_style_ieee = "define" +$! TODO: will the Intel port have ieee_extended for long doubles? +$ d_long_double_style_ieee_std = "define" +$ ENDIF $ d_acosh = "define" $ d_asinh = "define" $ d_atanh = "define" @@ -3368,6 +3391,12 @@ $ d_tgamma = "define" $ d_trunc = "define" $ d_truncl = "define" $ ELSE +$ d_double_style_vax = "define" +$ IF uselongdouble .OR. uselongdouble .EQS. "define" +$ THEN +$ d_long_double_style_vax = "undef" ! VAX format H unlikely +$ ENDIF +$ d_acosh = "undef" $ d_acosh = "undef" $ d_asinh = "undef" $ d_atanh = "undef" @@ -5987,6 +6016,14 @@ $ ENDIF $ WC "d_dlsymun='undef'" $ WC "d_backtrace='undef'" $ WC "d_dosuid='undef'" +$ WC "d_double_has_inf='" + d_double_has_inf + "'" +$ WC "d_double_has_nan='" + d_double_has_nan + "'" +$ WC "d_double_has_negative_zero='" + d_double_has_negative_zero + "'" +$ WC "d_double_has_subnormals='" + d_double_has_subnormals + "'" +$ WC "d_double_style_cray='undef'" +$ WC "d_double_style_ibm='undef'" +$ WC "d_double_style_ieee='" + d_double_style_ieee + "'" +$ WC "d_double_style_vax='" + d_double_style_vax + "'" $ WC "d_drand48proto='" + d_drand48proto + "'" $ WC "d_dup2='define'" $ WC "d_eaccess='undef'" @@ -6138,6 +6175,11 @@ $ WC "d_lockf='undef'" $ WC "d_log1p='" + d_log1p + "'" $ WC "d_log2='" + d_log2 + "'" $ WC "d_logb='" + d_logb + "'" +$ WC "d_long_double_style_ieee='" + d_long_double_style_ieee + "'" +$ WC "d_long_double_style_ieee_doubledouble='undef'" +$ WC "d_long_double_style_ieee_extended='" + d_long_double_style_ieee_extended + "'" +$ WC "d_long_double_style_ieee_std='" + d_long_double_style_ieee_std + "'" +$ WC "d_long_double_style_vax='" + d_long_double_style_vax + "'" $ WC "d_longdbl='" + d_longdbl + "'" $ WC "d_longlong='" + d_longlong + "'" $ WC "d_lrint='" + d_lrint + "'" diff --git a/ext/POSIX/Makefile.PL b/ext/POSIX/Makefile.PL index 56b8e53..bdaa4b6 100644 --- a/ext/POSIX/Makefile.PL +++ b/ext/POSIX/Makefile.PL @@ -92,13 +92,15 @@ END #endif '}); -unless ($Config{doublekind} == 9 || - $Config{doublekind} == 10 || - $Config{doublekind} == 11) { +if ($Config{d_double_has_inf}) { push @names, {name=>"INFINITY", type=>"NV", value=>"NV_INF", not_constant=>1}, - {name=>"NAN", type=>"NV", value=>"NV_NAN", not_constant=>1}, {name=>"Inf", type=>"NV", value=>"NV_INF", not_constant=>1}, +} + +if ($Config{d_double_has_nan}) { + push @names, + {name=>"NAN", type=>"NV", value=>"NV_NAN", not_constant=>1}, {name=>"NaN", type=>"NV", value=>"NV_NAN", not_constant=>1}; } diff --git a/ext/POSIX/t/math.t b/ext/POSIX/t/math.t index adb5de5..0426e03 100644 --- a/ext/POSIX/t/math.t +++ b/ext/POSIX/t/math.t @@ -55,17 +55,18 @@ between(0.76, tanh(1), 0.77, 'tanh(1)'); between(-0.77, tanh(-1), -0.76, 'tanh(-1)'); cmp_ok(tanh(1), '==', -tanh(-1), 'tanh(1) == -tanh(-1)'); -my $non_ieee_fp = ($Config{doublekind} == 9 || - $Config{doublekind} == 10 || - $Config{doublekind} == 11); - SKIP: { skip "no fpclassify", 4 unless $Config{d_fpclassify}; is(fpclassify(1), FP_NORMAL, "fpclassify 1"); is(fpclassify(0), FP_ZERO, "fpclassify 0"); - skip("no inf/nan", 2) if $non_ieee_fp; - is(fpclassify(INFINITY), FP_INFINITE, "fpclassify INFINITY"); - is(fpclassify(NAN), FP_NAN, "fpclassify NAN"); + SKIP: { + skip("no inf", 1) unless $Config{d_double_has_inf}; + is(fpclassify(INFINITY), FP_INFINITE, "fpclassify INFINITY"); + } + SKIP: { + skip("no nan", 1) unless $Config{d_double_has_nan}; + is(fpclassify(NAN), FP_NAN, "fpclassify NAN"); + } } sub near { @@ -104,15 +105,18 @@ SKIP: { ok(!isinf(42), "isinf 42"); ok(!isnan(42), "isnan Inf"); SKIP: { - skip("no inf/nan", 9) if $non_ieee_fp; + skip("no inf", 4) unless $Config{d_double_has_inf}; ok(!isfinite(Inf), "isfinite Inf"); - ok(!isfinite(NaN), "isfinite NaN"); ok(isinf(INFINITY), "isinf INFINITY"); ok(isinf(Inf), "isinf Inf"); + ok(!isnan(Inf), "isnan Inf"); + } + SKIP: { + skip("no nan", 5) unless $Config{d_double_has_nan}; + ok(!isfinite(NaN), "isfinite NaN"); ok(!isinf(NaN), "isinf NaN"); ok(isnan(NAN), "isnan NAN"); ok(isnan(NaN), "isnan NaN"); - ok(!isnan(Inf), "isnan Inf"); cmp_ok(nan(), '!=', nan(), 'nan'); } near(log1p(2), 1.09861228866811, "log1p", 1e-9); @@ -147,7 +151,7 @@ SKIP: { ok(islessequal(1, 1), "islessequal 1 1"); SKIP: { - skip("no inf/nan", 2) if $non_ieee_fp; + skip("no nan", 2) unless $Config{d_double_has_nan}; ok(!isless(1, NaN), "isless 1 NaN"); ok(isunordered(1, NaN), "isunordered 1 NaN"); } @@ -169,7 +173,7 @@ SKIP: { near(lgamma(9), 10.6046029027452, "lgamma 9", 1.5e-7); SKIP: { - skip("no inf/nan", 19) if $non_ieee_fp; + skip("no inf/nan", 19) unless $Config{d_double_has_inf} && $Config{d_double_has_nan}; # These don't work on old mips/hppa platforms # because nan with payload zero == Inf (or == -Inf). diff --git a/plan9/config_sh.sample b/plan9/config_sh.sample index a8f5dfc..9851e22 100644 --- a/plan9/config_sh.sample +++ b/plan9/config_sh.sample @@ -169,6 +169,14 @@ d_dlerror='undef' d_dlopen='undef' d_dlsymun='undef' d_dosuid='undef' +d_double_has_inf='define' +d_double_has_nan='define' +d_double_has_negative_zero='define' +d_double_has_subnormals='define' +d_double_style_cray='undef' +d_double_style_ibm='undef' +d_double_style_ieee='define' +d_double_style_vax='undef' d_drand48_r='undef' d_drand48proto='undef' d_dup2='define' @@ -346,6 +354,11 @@ d_lockf='undef' d_log1p='undef' d_log2='undef' d_logb='undef' +d_long_double_style_ieee='undef' +d_long_double_style_ieee_doubledouble='undef' +d_long_double_style_ieee_extended='define' +d_long_double_style_ieee_std='undef' +d_long_double_style_vax='undef' d_longdbl='define' d_longlong='define' d_lrint='undef' diff --git a/symbian/config.sh b/symbian/config.sh index b311521..1c08bd3 100644 --- a/symbian/config.sh +++ b/symbian/config.sh @@ -113,6 +113,14 @@ d_dlerror='undef' d_dlopen='undef' d_dlsymun='undef' d_dosuid='undef' +d_double_has_inf='define' +d_double_has_nan='define' +d_double_has_negative_zero='define' +d_double_has_subnormals='define' +d_double_style_cray='undef' +d_double_style_ibm='undef' +d_double_style_ieee='define' +d_double_style_vax='undef' d_drand48_r='undef' d_drand48proto='undef' d_dup2='undef' @@ -292,6 +300,11 @@ d_lockf='undef' d_log1p='undef' d_log2='undef' d_logb='undef' +d_long_double_style_ieee='undef' +d_long_double_style_ieee_doubledouble='undef' +d_long_double_style_ieee_extended='undef' +d_long_double_style_ieee_std='undef' +d_long_double_style_vax='undef' d_longdbl='undef' d_longlong='undef' d_lrint='undef' diff --git a/t/lib/warnings/9uninit b/t/lib/warnings/9uninit index fd63020..c8b843f 100644 --- a/t/lib/warnings/9uninit +++ b/t/lib/warnings/9uninit @@ -669,13 +669,10 @@ Use of uninitialized value in sort at - line 21. Use of uninitialized value in sort at - line 22. ######## use Config; -my $non_ieee_fp = ($Config{doublekind} == 9 || - $Config{doublekind} == 10 || - $Config{doublekind} == 11); -if ($non_ieee_fp) { +unless ($Config{d_double_has_inf} && $Config{d_double_has_nan}) { print <<EOM ; SKIPPED -# No nan support +# No inf/nan support EOM exit ; } @@ -692,8 +689,8 @@ use warnings 'uninitialized'; @sort = sort { ($a)[0] <=> $b } 1, $nan; @sort = sort { $a <=> $b } 1, $nan; EXPECT -Use of uninitialized value in sort at - line 22. -Use of uninitialized value in sort at - line 23. +Use of uninitialized value in sort at - line 19. +Use of uninitialized value in sort at - line 20. ######## use warnings 'uninitialized'; my ($m1, $m2, $v); diff --git a/t/lib/warnings/op b/t/lib/warnings/op index aba9c58..8240dd6 100644 --- a/t/lib/warnings/op +++ b/t/lib/warnings/op @@ -2042,6 +2042,17 @@ EXPECT Negative repeat count does nothing at - line 3. Negative repeat count does nothing at - line 4. ######## +use Config; +my $non_ieee_fp = ($Config{doublekind} == 9 || + $Config{doublekind} == 10 || + $Config{doublekind} == 11); +if ($non_ieee_fp) { + print <<EOM ; +SKIPPED +# No inf/nan support +EOM + exit ; +} my $a = "inf" + 0; my $b = -$a; my $c = "nan" + 0; @@ -2055,9 +2066,9 @@ my $y = "y" x $b; my $z = "z" x $c; no warnings 'numeric'; EXPECT -Non-finite repeat count does nothing at - line 5. -Non-finite repeat count does nothing at - line 6. -Non-finite repeat count does nothing at - line 7. +Non-finite repeat count does nothing at - line 16. +Non-finite repeat count does nothing at - line 17. +Non-finite repeat count does nothing at - line 18. ######## # NAME warn on stat @array @foo = ("op/stat.t"); diff --git a/t/lib/warnings/pp_sys b/t/lib/warnings/pp_sys index 6338964..56e2da5 100644 --- a/t/lib/warnings/pp_sys +++ b/t/lib/warnings/pp_sys @@ -911,6 +911,14 @@ closedir() attempted on invalid dirhandle $ï½ï½ï½ at - line 23. ######## # pp_sys.c [pp_gmtime] +use Config; +unless ($Config{d_double_has_nan}) { + print <<EOM ; +SKIPPED +# No nan support +EOM + exit ; +} gmtime("NaN"); localtime("NaN"); use warnings "overflow"; @@ -918,10 +926,10 @@ gmtime("NaN"); localtime("NaN"); EXPECT -gmtime(NaN) too large at - line 6. -gmtime(NaN) failed at - line 6. -localtime(NaN) too large at - line 7. -localtime(NaN) failed at - line 7. +gmtime(NaN) too large at - line 14. +gmtime(NaN) failed at - line 14. +localtime(NaN) too large at - line 15. +localtime(NaN) failed at - line 15. ######## # pp_sys.c [pp_alarm] diff --git a/t/lib/warnings/utf8 b/t/lib/warnings/utf8 index 1c782e7..dded118 100644 --- a/t/lib/warnings/utf8 +++ b/t/lib/warnings/utf8 @@ -764,6 +764,11 @@ BEGIN{ print "SKIPPED\n# ebcdic platforms generates different Malformed UTF-8 warnings."; exit 0; } -{};$^H=2**400} + use Config; + unless ($Double{double_style_ieee}) { + print "SKIPPED\n# non-IEEE fp range."; + exit 0; + } +{};$^H=eval'2**400'} EXPECT -Malformed UTF-8 character: \xc2\x0a (unexpected non-continuation byte 0x0a, immediately after start byte 0xc2; need 2 bytes, got 1) at - line 6. +Malformed UTF-8 character: \xc2\x0a (unexpected non-continuation byte 0x0a, immediately after start byte 0xc2; need 2 bytes, got 1) at - line 11. diff --git a/t/op/hexfp.t b/t/op/hexfp.t index bdf1e95..29378f2 100644 --- a/t/op/hexfp.t +++ b/t/op/hexfp.t @@ -248,8 +248,7 @@ SKIP: { skip("non-80-bit-long-double", 4) unless ($Config{uselongdouble} && ($Config{nvsize} == 16 || $Config{nvsize} == 12) && - ($Config{longdblkind} == 3 || - $Config{longdblkind} == 4)); + ($Config{long_double_style_ieee_extended})); is(0x1p-1074, 4.94065645841246544e-324); is(0x1p-1075, 2.47032822920623272e-324, '[perl #128919]'); is(0x1p-1076, 1.23516411460311636e-324); diff --git a/t/op/inc.t b/t/op/inc.t index 20d4769..c685a70 100644 --- a/t/op/inc.t +++ b/t/op/inc.t @@ -188,13 +188,11 @@ cmp_ok($a, '==', 2147483647, "postdecrement properly downgrades from double"); SKIP: { if ($Config{uselongdouble} && - ($Config{longdblkind} == 6 || $Config{longdblkind} == 5)) { + ($Config{long_double_style_ieee_doubledouble})) { skip "the double-double format is weird", 1; } - if ($Config{doublekind} == 9 || - $Config{doublekind} == 10 || - $Config{doublekind} == 11) { - skip "the VAX format is not IEEE", 1; + unless ($Config{double_style_ieee}) { + skip "the doublekind $Config{doublekind} is not IEEE", 1; } # I'm sure that there's an IBM format with a 48 bit mantissa diff --git a/t/op/infnan.t b/t/op/infnan.t index b50d6e6..1f68cff 100644 --- a/t/op/infnan.t +++ b/t/op/infnan.t @@ -16,9 +16,7 @@ BEGIN { # but Inf is completely broken (e.g. Inf + 0 -> NaN). skip_all "$^O with long doubles does not have sane inf/nan"; } - if ($Config{doublekind} == 9 || - $Config{doublekind} == 10 || - $Config{doublekind} == 11) { + unless ($Config{d_double_has_inf} && $Config{d_double_has_nan}) { skip_all "the doublekind $Config{doublekind} does not have inf/nan"; } } diff --git a/t/op/pack.t b/t/op/pack.t index 014fbc5..3fc12e4 100644 --- a/t/op/pack.t +++ b/t/op/pack.t @@ -50,8 +50,6 @@ for my $size ( 16, 32, 64 ) { my $IsTwosComplement = pack('i', -1) eq "\xFF" x $Config{intsize}; print "# \$IsTwosComplement = $IsTwosComplement\n"; -my $vax_float = (pack("d", 1) =~ /^[\x80\x10]\x40/); - sub is_valid_error { my $err = shift; @@ -297,7 +295,7 @@ sub list_eq ($$) { # Is this a stupid thing to do on VMS, VOS and other unusual platforms? skip("-- the IEEE infinity model is unavailable in this configuration.", 1) - if (($^O eq 'VMS') && !defined($Config{useieee}) || $vax_float); + if (($^O eq 'VMS') && !defined($Config{useieee}) || !$Config{d_double_has_inf}); skip("-- $^O has serious fp indigestion on w-packed infinities", 1) if ( @@ -322,7 +320,7 @@ sub list_eq ($$) { SKIP: { skip("-- the full range of an IEEE double may not be available in this configuration.", 3) - if (($^O eq 'VMS') && !defined($Config{useieee}) || $vax_float); + if (($^O eq 'VMS') && !defined($Config{useieee}) || !$Config{d_double_style_ieee}); skip("-- $^O does not like 2**1023", 3) if (($^O eq 'ultrix')); @@ -1534,7 +1532,7 @@ is(unpack('c'), 65, "one-arg unpack (change #18751)"); # defaulting to $_ is($x[1], $y[1], "checksum advance ok"); SKIP: { - skip("-- VAX float", 1) if $vax_float; + skip("-- non-IEEE float", 1) if !$Config{d_double_style_ieee}; # verify that the checksum is not overflowed with C0 is(unpack("C0%128U", "abcd"), unpack("U0%128U", "abcd"), "checksum not overflowed"); } diff --git a/t/op/sprintf2.t b/t/op/sprintf2.t index 8b9931f..56ef3e2 100644 --- a/t/op/sprintf2.t +++ b/t/op/sprintf2.t @@ -528,10 +528,8 @@ for my $num (0, -1, 1) { } } -my $vax_float = (pack("d", 1) =~ /^[\x80\x10]\x40/); - SKIP: { - if ($vax_float) { skip "VAX float has no Inf or NaN", 3 } + unless ($Config{d_double_has_inf} && $Config{d_double_has_nan}) { skip "no Inf or NaN in doublekind $Config{doublekind}", 3 } # test that %f doesn't panic with +Inf, -Inf, NaN [perl #45383] foreach my $n ('2**1e100', '-2**1e100', '2**1e100/2**1e100') { # +Inf, -Inf, NaN eval { my $f = sprintf("%f", eval $n); }; @@ -600,7 +598,7 @@ is $o::count, 0, 'sprintf %d string overload count is 0'; is $o::numcount, 1, 'sprintf %d number overload count is 1'; SKIP: { # hexfp - if ($vax_float) { skip "VAX float no hexfp", scalar @hexfloat } + unless ($Config{d_double_style_ieee}) { skip "no IEEE, no hexfp", scalar @hexfloat } my $ppc_linux = $Config{archname} =~ /^(?:ppc|power(?:pc)?)(?:64)?-linux/; my $irix_ld = $Config{archname} =~ /^IP\d+-irix-ld$/; @@ -696,8 +694,7 @@ SKIP: { skip("uselongdouble=" . ($Config{uselongdouble} ? 'define' : 'undef') . " longdblkind=$Config{longdblkind} os=$^O", 6) unless ($Config{uselongdouble} && - ($Config{longdblkind} == 5 || - $Config{longdblkind} == 6) + ($Config{long_double_style_ieee_doubledouble}) # Gating on 'linux' (ppc) here is due to the differing # double-double implementations: other (also big-endian) # double-double platforms (e.g. AIX on ppc or IRIX on mips) @@ -862,8 +859,7 @@ SKIP: { skip("non-80-bit-long-double", 17) unless ($Config{uselongdouble} && ($Config{nvsize} == 16 || $Config{nvsize} == 12) && - ($Config{longdblkind} == 3 || - $Config{longdblkind} == 4)); + ($Config{long_double_style_ieee_extended})); { # The last normal for this format. diff --git a/t/opbasic/arith.t b/t/opbasic/arith.t index 81f272a..75dc56e 100644 --- a/t/opbasic/arith.t +++ b/t/opbasic/arith.t @@ -427,12 +427,11 @@ if ($^O eq 'VMS') { eval {require Config; import Config}; $vms_no_ieee = 1 unless defined($Config{useieee}); } -my $vax_float = (pack("d",1) =~ /^[\x80\x10]\x40/); if ($^O eq 'vos') { print "not ok ", $T++, " # TODO VOS raises SIGFPE instead of producing infinity.\n"; } -elsif ($vms_no_ieee || $vax_float) { +elsif ($vms_no_ieee || !$Config{d_double_has_inf}) { print "ok ", $T++, " # SKIP -- the IEEE infinity model is unavailable in this configuration.\n" } elsif ($^O eq 'ultrix') { @@ -462,8 +461,8 @@ else { # [perl #120426] # small numbers shouldn't round to zero if they have extra floating digits -if ($vax_float) { -for (1..8) { print "ok ", $T++, " # SKIP -- VAX not IEEE\n" } +unless ($Config{d_double_style_ieee}) { +for (1..8) { print "ok ", $T++, " # SKIP -- not IEEE\n" } } else { try $T++, 0.153e-305 != 0.0, '0.153e-305'; try $T++, 0.1530e-305 != 0.0, '0.1530e-305'; diff --git a/t/porting/globvar.t b/t/porting/globvar.t index f917fd8..8dd45ba 100644 --- a/t/porting/globvar.t +++ b/t/porting/globvar.t @@ -61,12 +61,10 @@ foreach my $file (map {$_ . $Config{_o}} qw(globals regcomp)) { close $fh or die "Problem running nm $file"; } -my $non_ieee_fp = ($Config{doublekind} == 9 || - $Config{doublekind} == 10 || - $Config{doublekind} == 11); - -if ($non_ieee_fp) { +unless ($Config{d_double_has_inf}) { $skip{PL_inf}++; +} +unless ($Config{d_double_has_nan}) { $skip{PL_nan}++; } diff --git a/uconfig.h b/uconfig.h index f8bb9c0..ebfb194 100644 --- a/uconfig.h +++ b/uconfig.h @@ -1911,6 +1911,30 @@ * LONG_DOUBLE_IS_UNKNOWN_FORMAT * It is only defined if the system supports long doubles. */ +/* LONG_DOUBLE_STYLE_IEEE + * This symbol, if defined, indicates that the long double + * is any of the IEEE 754 style long doubles: + * LONG_DOUBLE_STYLE_IEEE_STD, LONG_DOUBLE_STYLE_IEEE_EXTENDED, + * LONG_DOUBLE_STYLE_IEEE_DOUBLEDOUBLE. + */ +/* LONG_DOUBLE_STYLE_IEEE_DOUBLEDOUBLE + * This symbol, if defined, indicates that the long double is + * the 128-bit double-double. + */ +/* LONG_DOUBLE_STYLE_IEEE_EXTENDED + * This symbol, if defined, indicates that the long double is + * the 80-bit IEEE 754. Note that despite the 'extended' this + * is less than the 'std', since this is an extension of + * the double precision. + */ +/* LONG_DOUBLE_STYLE_IEEE_STD + * This symbol, if defined, indicates that the long double is + * the 128-bit IEEE 754. + */ +/* LONG_DOUBLE_STYLE_VAX + * This symbol, if defined, indicates that the long double is + * the 128-bit VAX format H. + */ /*#define HAS_LDEXPL / **/ /*#define HAS_LONG_DOUBLE / **/ #ifdef HAS_LONG_DOUBLE @@ -1929,6 +1953,11 @@ #define LONG_DOUBLE_IS_UNKNOWN_FORMAT -1 #define LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_LITTLE_ENDIAN LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_LE_LE /* back-compat */ #define LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_BIG_ENDIAN LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_BE_BE /* back-compat */ +#undef LONG_DOUBLE_STYLE_IEEE +#undef LONG_DOUBLE_STYLE_IEEE_DOUBLEDOUBLE +#undef LONG_DOUBLE_STYLE_IEEE_EXTENDED +#undef LONG_DOUBLE_STYLE_IEEE_STD +#undef LONG_DOUBLE_STYLE_VAX #endif /* HAS_LONG_LONG: @@ -3952,6 +3981,38 @@ * DOUBLE_IS_CRAY_SINGLE_64_BIT * DOUBLE_IS_UNKNOWN_FORMAT */ +/* DOUBLE_HAS_INF + * This symbol, if defined, indicates that the double has + * the infinity. + */ +/* DOUBLE_HAS_NAN + * This symbol, if defined, indicates that the double has + * the not-a-number. + */ +/* DOUBLE_HAS_NEGATIVE_ZERO + * This symbol, if defined, indicates that the double has + * the negative_zero. + */ +/* DOUBLE_HAS_SUBNORMALS + * This symbol, if defined, indicates that the double has + * the subnormals (denormals). + */ +/* DOUBLE_STYLE_CRAY + * This symbol, if defined, indicates that the double is + * the 64-bit CRAY mainframe format. + */ +/* DOUBLE_STYLE_IBM + * This symbol, if defined, indicates that the double is + * the 64-bit IBM mainframe format. + */ +/* DOUBLE_STYLE_IEEE + * This symbol, if defined, indicates that the double is + * the 64-bit IEEE 754. + */ +/* DOUBLE_STYLE_VAX + * This symbol, if defined, indicates that the double is + * the 64-bit VAX format D or G. + */ #define DOUBLEKIND 3 /**/ #define DOUBLE_IS_IEEE_754_32_BIT_LITTLE_ENDIAN 1 #define DOUBLE_IS_IEEE_754_32_BIT_BIG_ENDIAN 2 @@ -3972,6 +4033,14 @@ /*#define PERL_PRIgldbl "llg" / **/ /*#define PERL_PRIeldbl "lle" / **/ /*#define PERL_SCNfldbl "llf" / **/ +#define DOUBLE_HAS_INF +#define DOUBLE_HAS_INF +#define DOUBLE_HAS_NEGATIVE_ZERO +#define DOUBLE_HAS_SUBNORMALS +#undef DOUBLE_STYLE_CRAY +#undef DOUBLE_STYLE_IBM +#define DOUBLE_STYLE_IEEE +#undef DOUBLE_STYLE_VAX /* DOUBLEMANTBITS: * This symbol, if defined, tells how many mantissa bits @@ -5279,6 +5348,6 @@ #endif /* Generated from: - * 6b650d833a54250188bb71d659ae15d31148e6b005c50a63ef8e3599668a1c43 config_h.SH - * 0fca2bf99ac976bba919b593a18bacd059c581dbe6c8638dc0861b1e613b8406 uconfig.sh + * 5de872cc1d9c7b501c2a9b92906e99797b58980e5245ff18b59d4ef324cf5d91 config_h.SH + * 4145d7916a5873433a2a9e6c68b1ce00b0f46df11a359453e5010576ef149634 uconfig.sh * ex: set ro: */ diff --git a/uconfig.sh b/uconfig.sh index edc36db..3174bba 100644 --- a/uconfig.sh +++ b/uconfig.sh @@ -107,6 +107,14 @@ d_dlerror='undef' d_dlopen='undef' d_dlsymun='undef' d_dosuid='undef' +d_double_has_inf='define' +d_double_has_nan='define' +d_double_has_negative_zero='define' +d_double_has_subnormals='define' +d_double_style_cray='undef' +d_double_style_ibm='undef' +d_double_style_ieee='define' +d_double_style_vax='undef' d_drand48_r='undef' d_drand48proto='undef' d_dup2='undef' @@ -285,6 +293,11 @@ d_lockf='undef' d_log1p='undef' d_log2='undef' d_logb='undef' +d_long_double_style_ieee='undef' +d_long_double_style_ieee_doubledouble='undef' +d_long_double_style_ieee_extended='undef' +d_long_double_style_ieee_std='undef' +d_long_double_style_vax='undef' d_longdbl='undef' d_longlong='undef' d_lrint='undef' diff --git a/uconfig64.sh b/uconfig64.sh index df18372..1eb7eac 100644 --- a/uconfig64.sh +++ b/uconfig64.sh @@ -108,6 +108,14 @@ d_dlerror='undef' d_dlopen='undef' d_dlsymun='undef' d_dosuid='undef' +d_double_has_inf='define' +d_double_has_nan='define' +d_double_has_negative_zero='define' +d_double_has_subnormals='define' +d_double_style_cray='undef' +d_double_style_ibm='undef' +d_double_style_ieee='define' +d_double_style_vax='undef' d_drand48_r='undef' d_drand48proto='undef' d_dup2='undef' @@ -286,6 +294,11 @@ d_lockf='undef' d_log1p='undef' d_log2='undef' d_logb='undef' +d_long_double_style_ieee='undef' +d_long_double_style_ieee_doubledouble='undef' +d_long_double_style_ieee_extended='undef' +d_long_double_style_ieee_std='undef' +d_long_double_style_vax='undef' d_longdbl='undef' d_longlong='undef' d_lrint='undef' diff --git a/vms/munchconfig.c b/vms/munchconfig.c index c76809a..8f20417 100644 --- a/vms/munchconfig.c +++ b/vms/munchconfig.c @@ -34,7 +34,7 @@ /* The biggest line we can read in from a file */ #define LINEBUFFERSIZE 1024 #define NUMTILDESUBS 30 -#define NUMCONFIGSUBS 1000 +#define NUMCONFIGSUBS 1500 #define TOKENBUFFERSIZE 80 typedef struct { diff --git a/win32/config.ce b/win32/config.ce index 8f68ddd..47042d8 100644 --- a/win32/config.ce +++ b/win32/config.ce @@ -154,6 +154,14 @@ d_dlerror='define' d_dlopen='define' d_dlsymun='undef' d_dosuid='undef' +d_double_has_inf='define' +d_double_has_nan='define' +d_double_has_negative_zero='define' +d_double_has_subnormals='define' +d_double_style_cray='undef' +d_double_style_ibm='undef' +d_double_style_ieee='define' +d_double_style_vax='undef' d_drand48_r='undef' d_drand48proto='undef' d_dup2='define' @@ -333,6 +341,11 @@ d_lockf='undef' d_log1p='undef' d_log2='undef' d_logb='undef' +d_long_double_style_ieee='undef' +d_long_double_style_ieee_doubledouble='undef' +d_long_double_style_ieee_extended='undef' +d_long_double_style_ieee_std='undef' +d_long_double_style_vax='undef' d_longdbl='undef' d_longlong='undef' d_lrint='undef' diff --git a/win32/config.gc b/win32/config.gc index 69a21a2..34b670e 100644 --- a/win32/config.gc +++ b/win32/config.gc @@ -156,6 +156,14 @@ d_dlerror='define' d_dlopen='define' d_dlsymun='undef' d_dosuid='undef' +d_double_has_inf='define' +d_double_has_nan='define' +d_double_has_negative_zero='define' +d_double_has_subnormals='define' +d_double_style_cray='undef' +d_double_style_ibm='undef' +d_double_style_ieee='define' +d_double_style_vax='undef' d_drand48_r='undef' d_drand48proto='undef' d_dup2='define' @@ -333,6 +341,11 @@ d_lockf='undef' d_log1p='undef' d_log2='undef' d_logb='undef' +d_long_double_style_ieee='undef' +d_long_double_style_ieee_doubledouble='undef' +d_long_double_style_ieee_extended='define' +d_long_double_style_ieee_std='undef' +d_long_double_style_vax='undef' d_longdbl='define' d_longlong='define' d_lrint='undef' diff --git a/win32/config.vc b/win32/config.vc index 50d2a92..cfac6e7 100644 --- a/win32/config.vc +++ b/win32/config.vc @@ -156,6 +156,14 @@ d_dlerror='define' d_dlopen='define' d_dlsymun='undef' d_dosuid='undef' +d_double_has_inf='define' +d_double_has_nan='define' +d_double_has_negative_zero='define' +d_double_has_subnormals='define' +d_double_style_cray='undef' +d_double_style_ibm='undef' +d_double_style_ieee='define' +d_double_style_vax='undef' d_drand48_r='undef' d_drand48proto='undef' d_dup2='define' @@ -333,6 +341,11 @@ d_lockf='undef' d_log1p='undef' d_log2='undef' d_logb='undef' +d_long_double_style_ieee='undef' +d_long_double_style_ieee_doubledouble='undef' +d_long_double_style_ieee_extended='define' +d_long_double_style_ieee_std='undef' +d_long_double_style_vax='undef' d_longdbl='define' d_longlong='undef' d_lrint='undef' diff --git a/win32/config_H.ce b/win32/config_H.ce index e755bc1..f143489 100644 --- a/win32/config_H.ce +++ b/win32/config_H.ce @@ -2672,6 +2672,32 @@ */ #define DOUBLESIZE 8 /**/ +/* DOUBLE_STYLE_IEEE + * This symbol, if defined, indicates that the double is + * the 64-bit IEEE 754. + */ +/* DOUBLE_HAS_INF + * This symbol, if defined, indicates that the double has + * the infinity. + */ +/* DOUBLE_HAS_NAN + * This symbol, if defined, indicates that the double has + * the not-a-number. + */ +/* DOUBLE_HAS_NEGATIVE_ZERO + * This symbol, if defined, indicates that the double has + * the negative_zero. + */ +/* DOUBLE_HAS_SUBNORMALS + * This symbol, if defined, indicates that the double has + * the subnormals (denormals). + */ +#define DOUBLE_STYLE_IEEE +#define DOUBLE_HAS_INF +#define DOUBLE_HAS_INF +#define DOUBLE_HAS_NEGATIVE_ZERO +#define DOUBLE_HAS_SUBNORMALS + /* DOUBLEINFBYTES: * This symbol, if defined, is a comma-separated list of * hexadecimal bytes for the double precision infinity. diff --git a/win32/config_H.gc b/win32/config_H.gc index 2254974..591e72d 100644 --- a/win32/config_H.gc +++ b/win32/config_H.gc @@ -2639,6 +2639,32 @@ */ #define DOUBLESIZE 8 /**/ +/* DOUBLE_STYLE_IEEE + * This symbol, if defined, indicates that the double is + * the 64-bit IEEE 754. + */ +/* DOUBLE_HAS_INF + * This symbol, if defined, indicates that the double has + * the infinity. + */ +/* DOUBLE_HAS_NAN + * This symbol, if defined, indicates that the double has + * the not-a-number. + */ +/* DOUBLE_HAS_NEGATIVE_ZERO + * This symbol, if defined, indicates that the double has + * the negative_zero. + */ +/* DOUBLE_HAS_SUBNORMALS + * This symbol, if defined, indicates that the double has + * the subnormals (denormals). + */ +#define DOUBLE_STYLE_IEEE +#define DOUBLE_HAS_INF +#define DOUBLE_HAS_INF +#define DOUBLE_HAS_NEGATIVE_ZERO +#define DOUBLE_HAS_SUBNORMALS + /* DOUBLEINFBYTES: * This symbol, if defined, is a comma-separated list of * hexadecimal bytes for the double precision infinity. @@ -2679,6 +2705,21 @@ */ #define LONGDBLMANTBITS 64 +/* LONG_DOUBLE_STYLE_IEEE + * This symbol, if defined, indicates that the long double + * is any of the IEEE 754 style long doubles: + * LONG_DOUBLE_STYLE_IEEE_STD, LONG_DOUBLE_STYLE_IEEE_EXTENDED, + * LONG_DOUBLE_STYLE_IEEE_DOUBLEDOUBLE. + */ +/* LONG_DOUBLE_STYLE_IEEE_EXTENDED + * This symbol, if defined, indicates that the long double is + * the 80-bit IEEE 754. Note that despite the 'extended' this + * is less than the 'std', since this is an extension of + * the double precision. + */ +#define LONG_DOUBLE_STYLE_IEEE +#define LONG_DOUBLE_STYLE_IEEE_EXTENDED + /* EBCDIC: * This symbol, if defined, indicates that this system uses * EBCDIC encoding. diff --git a/win32/config_H.vc b/win32/config_H.vc index 3d17f63..b87c58e 100644 --- a/win32/config_H.vc +++ b/win32/config_H.vc @@ -2631,6 +2631,32 @@ */ #define DOUBLESIZE 8 /**/ +/* DOUBLE_STYLE_IEEE + * This symbol, if defined, indicates that the double is + * the 64-bit IEEE 754. + */ +/* DOUBLE_HAS_INF + * This symbol, if defined, indicates that the double has + * the infinity. + */ +/* DOUBLE_HAS_NAN + * This symbol, if defined, indicates that the double has + * the not-a-number. + */ +/* DOUBLE_HAS_NEGATIVE_ZERO + * This symbol, if defined, indicates that the double has + * the negative_zero. + */ +/* DOUBLE_HAS_SUBNORMALS + * This symbol, if defined, indicates that the double has + * the subnormals (denormals). + */ +#define DOUBLE_STYLE_IEEE +#define DOUBLE_HAS_INF +#define DOUBLE_HAS_INF +#define DOUBLE_HAS_NEGATIVE_ZERO +#define DOUBLE_HAS_SUBNORMALS + /* DOUBLEINFBYTES: * This symbol, if defined, is a comma-separated list of * hexadecimal bytes for the double precision infinity. @@ -2671,6 +2697,21 @@ */ #define LONGDBLMANTBITS 52 +/* LONG_DOUBLE_STYLE_IEEE + * This symbol, if defined, indicates that the long double + * is any of the IEEE 754 style long doubles: + * LONG_DOUBLE_STYLE_IEEE_STD, LONG_DOUBLE_STYLE_IEEE_EXTENDED, + * LONG_DOUBLE_STYLE_IEEE_DOUBLEDOUBLE. + */ +/* LONG_DOUBLE_STYLE_IEEE_EXTENDED + * This symbol, if defined, indicates that the long double is + * the 80-bit IEEE 754. Note that despite the 'extended' this + * is less than the 'std', since this is an extension of + * the double precision. + */ +#define LONG_DOUBLE_STYLE_IEEE +#define LONG_DOUBLE_STYLE_IEEE_EXTENDED + /* EBCDIC: * This symbol, if defined, indicates that this system uses * EBCDIC encoding. -- Perl5 Master Repository
