diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-08-09 13:21:51 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-08-09 13:21:51 +0000 |
commit | 758a5d7997f283f8e3786c3e353533cc466d5004 (patch) | |
tree | 8ef56dd97bbe416bf6a27f16213d1dcd827d4e7b /Porting | |
parent | 016501c1bd27cb10e1edd3e59809e490357b700c (diff) | |
download | perl-758a5d7997f283f8e3786c3e353533cc466d5004.tar.gz |
Introduce more floating point classifying APIs;
try to define (most importantly) Perl_is{inf,nan}(x).
For this first cut, assume none such APIs exist in non-UNIXoid
platforms-- this is of course too unkind: Win32 rumoredly has
_fpclass() and _isnan(), and VMS/VOS very probably have some
of the APIs available. The only thing Perl uses at the moment
is Perl_isnan() (has been in use for a while now).
NOTE: the Win32 and NetWare config_h.?c need regenerating.
p4raw-id: //depot/perl@11618
Diffstat (limited to 'Porting')
-rw-r--r-- | Porting/Glossary | 48 | ||||
-rw-r--r-- | Porting/config.sh | 26 | ||||
-rw-r--r-- | Porting/config_H | 132 |
3 files changed, 198 insertions, 8 deletions
diff --git a/Porting/Glossary b/Porting/Glossary index aaea2e7759..3ffbdcc876 100644 --- a/Porting/Glossary +++ b/Porting/Glossary @@ -431,6 +431,10 @@ d_chsize (d_chsize.U): indicates to the C program that the chsize() routine is available to truncate files. You might need a -lx to get this routine. +d_class (d_class.U): + This variable conditionally defines the HAS_CLASS symbol, which + indicates to the C program that the class() routine is available. + d_closedir (d_closedir.U): This variable conditionally defines HAS_CLOSEDIR if closedir() is available. @@ -586,6 +590,14 @@ d_fgetpos (d_fgetpos.U): This variable conditionally defines HAS_FGETPOS if fgetpos() is available to get the file position indicator. +d_finite (d_finite.U): + This variable conditionally defines the HAS_FINITE symbol, which + indicates to the C program that the finite() routine is available. + +d_finitel (d_finitel.U): + This variable conditionally defines the HAS_FINITEL symbol, which + indicates to the C program that the finitel() routine is available. + d_flexfnam (d_flexfnam.U): This variable conditionally defines the FLEXFILENAMES symbol, which indicates that the system supports filenames longer than 14 characters. @@ -604,12 +616,28 @@ d_fork (d_fork.U): This variable conditionally defines the HAS_FORK symbol, which indicates to the C program that the fork() routine is available. +d_fp_class (d_fp_class.U): + This variable conditionally defines the HAS_FP_CLASS symbol, which + indicates to the C program that the fp_class() routine is available. + d_fpathconf (d_pathconf.U): This variable conditionally defines the HAS_FPATHCONF symbol, which indicates to the C program that the pathconf() routine is available to determine file-system related limits and options associated with a given open file descriptor. +d_fpclass (d_fpclass.U): + This variable conditionally defines the HAS_FPCLASS symbol, which + indicates to the C program that the fpclass() routine is available. + +d_fpclassify (d_fpclassify.U): + This variable conditionally defines the HAS_FPCLASSIFY symbol, which + indicates to the C program that the fpclassify() routine is available. + +d_fpclassl (d_fpclassl.U): + This variable conditionally defines the HAS_FPCLASSL symbol, which + indicates to the C program that the fpclassl() routine is available. + d_fpos64_t (d_fpos64_t.U): This symbol will be defined if the C compiler supports fpos64_t. @@ -871,6 +899,14 @@ d_isascii (d_isascii.U): This variable conditionally defines the HAS_ISASCII constant, which indicates to the C program that isascii() is available. +d_isfinite (d_isfinite.U): + This variable conditionally defines the HAS_ISFINITE symbol, which + indicates to the C program that the isfinite() routine is available. + +d_isinf (d_isinf.U): + This variable conditionally defines the HAS_ISINF symbol, which + indicates to the C program that the isinf() routine is available. + d_isnan (d_isnan.U): This variable conditionally defines the HAS_ISNAN symbol, which indicates to the C program that the isnan() routine is available. @@ -1773,6 +1809,10 @@ d_union_semun (d_union_semun.U): This variable conditionally defines HAS_UNION_SEMUN if the union semun is defined by including <sys/sem.h>. +d_unordered (d_unordered.U): + This variable conditionally defines the HAS_UNORDERED symbol, which + indicates to the C program that the unordered() routine is available. + d_usleep (d_usleep.U): This variable conditionally defines HAS_USLEEP if usleep() is available to do high granularity sleeps. @@ -2156,6 +2196,14 @@ i_float (i_float.U): whether a C program may include <float.h> to get symbols like DBL_MAX or DBL_MIN, i.e. machine dependent floating point values. +i_fp (i_fp.U): + This variable conditionally defines the I_FP symbol, and indicates + whether a C program should include <fp.h>. + +i_fp_class (i_fp_class.U): + This variable conditionally defines the I_FP_CLASS symbol, and indicates + whether a C program should include <fp_class.h>. + i_gdbm (i_gdbm.U): This variable conditionally defines the I_GDBM symbol, which indicates to the C program that <gdbm.h> exists and should diff --git a/Porting/config.sh b/Porting/config.sh index 4bf2b8b464..17fca1c4df 100644 --- a/Porting/config.sh +++ b/Porting/config.sh @@ -8,7 +8,7 @@ # Package name : perl5 # Source directory : . -# Configuration time: Tue Jul 31 18:19:35 EET DST 2001 +# Configuration time: Thu Aug 9 16:48:44 EET DST 2001 # Configured by : jhi # Target system : osf1 alpha.hut.fi v4.0 878 alpha @@ -56,14 +56,14 @@ cat='cat' cc='cc' cccdlflags=' ' ccdlflags=' -Wl,-rpath,/opt/perl/lib/5.7.2/alpha-dec_osf/CORE' -ccflags='-std -fprm d -ieee -D_INTRINSICS -DLANGUAGE_C' +ccflags='-std -D_INTRINSICS -DLANGUAGE_C' ccflags_uselargefiles='' ccname='cc' ccsymbols='__alpha=1 __LANGUAGE_C__=1 __osf__=1 __unix__=1 _LONGLONG=1 _SYSTYPE_BSD=1 SYSTYPE_BSD=1 unix=1' ccversion='V5.6-082' cf_by='jhi' cf_email='yourname@yourhost.yourplace.com' -cf_time='Tue Jul 31 18:19:35 EET DST 2001' +cf_time='Thu Aug 9 16:48:44 EET DST 2001' charsize='1' chgrp='' chmod='chmod' @@ -77,7 +77,7 @@ cpio='' cpp='cpp' cpp_stuff='42' cppccsymbols='LANGUAGE_C=1' -cppflags='-std -ieee -D_INTRINSICS -DLANGUAGE_C' +cppflags='-std -D_INTRINSICS -DLANGUAGE_C' cpplast='' cppminus='' cpprun='/usr/bin/cpp' @@ -120,6 +120,7 @@ d_charvspr='undef' d_chown='define' d_chroot='define' d_chsize='undef' +d_class='undef' d_closedir='define' d_cmsghdr_s='define' d_const='define' @@ -154,11 +155,17 @@ d_fd_macros='define' d_fd_set='define' d_fds_bits='define' d_fgetpos='define' +d_finite='define' +d_finitel='define' d_flexfnam='define' d_flock='define' d_flockproto='undef' d_fork='define' +d_fp_class='define' d_fpathconf='define' +d_fpclass='undef' +d_fpclassify='undef' +d_fpclassl='undef' d_fpos64_t='undef' d_frexpl='define' d_fs_data_s='undef' @@ -214,6 +221,8 @@ d_index='undef' d_inetaton='define' d_int64_t='undef' d_isascii='define' +d_isfinite='undef' +d_isinf='undef' d_isnan='define' d_isnanl='define' d_killpg='define' @@ -400,6 +409,7 @@ d_ualarm='define' d_umask='define' d_uname='define' d_union_semun='undef' +d_unordered='define' d_usleep='define' d_usleepproto='undef' d_ustat='define' @@ -485,6 +495,8 @@ i_dld='undef' i_dlfcn='define' i_fcntl='undef' i_float='define' +i_fp='define' +i_fp_class='define' i_gdbm='undef' i_grp='define' i_iconv='define' @@ -674,7 +686,7 @@ patchlevel='7' path_sep=':' perl5='perl' perl='' -perl_patchlevel='11497' +perl_patchlevel='11596' perladmin='yourname@yourhost.yourplace.com' perllibs='-lm -liconv -lutil' perlpath='/opt/perl/bin/perl' @@ -842,7 +854,7 @@ vendorlibexp='' vendorprefix='' vendorprefixexp='' version='5.7.2' -version_patchlevel_string='version 7 subversion 2 patch 11497' +version_patchlevel_string='version 7 subversion 2 patch 11596' versiononly='define' vi='' voidflags='15' @@ -872,7 +884,7 @@ PERL_SUBVERSION=2 PERL_API_REVISION=5 PERL_API_VERSION=5 PERL_API_SUBVERSION=0 -PERL_PATCHLEVEL=11497 +PERL_PATCHLEVEL=11596 PERL_CONFIG_SH=true # Variables propagated from previous config.sh file. pp_sys_cflags='ccflags="$ccflags -DNO_EFF_ONLY_OK"' diff --git a/Porting/config_H b/Porting/config_H index 6008f4cd15..896a878699 100644 --- a/Porting/config_H +++ b/Porting/config_H @@ -17,7 +17,7 @@ /* * Package name : perl5 * Source directory : . - * Configuration time: Tue Jul 31 18:19:35 EET DST 2001 + * Configuration time: Thu Aug 9 16:48:44 EET DST 2001 * Configured by : jhi * Target system : osf1 alpha.hut.fi v4.0 878 alpha */ @@ -1210,6 +1210,24 @@ #define CASTNEGFLOAT /**/ #define CASTFLAGS 0 /**/ +/* HAS_CLASS: + * This symbol, if defined, indicates that the class routine is + * available to classify doubles. Available for example in AIX. + * The returned values are defined in <float.h> and are: + * + * FP_PLUS_NORM Positive normalized, nonzero + * FP_MINUS_NORM Negative normalized, nonzero + * FP_PLUS_DENORM Positive denormalized, nonzero + * FP_MINUS_DENORM Negative denormalized, nonzero + * FP_PLUS_ZERO +0.0 + * FP_MINUS_ZERO -0.0 + * FP_PLUS_INF +INF + * FP_MINUS_INF -INF + * FP_NANS Signaling Not a Number (NaNS) + * FP_NANQ Quiet Not a Number (NaNQ) + */ +/*#define HAS_CLASS / **/ + /* VOID_CLOSEDIR: * This symbol, if defined, indicates that the closedir() routine * does not return a value. @@ -1304,12 +1322,93 @@ */ #define HAS_FD_SET /**/ +/* HAS_FINITE: + * This symbol, if defined, indicates that the finite routine is + * available to check whether a double is finite (non-infinity non-NaN). + */ +#define HAS_FINITE /**/ + +/* HAS_FINITEL: + * This symbol, if defined, indicates that the finitel routine is + * available to check whether a long double is finite + * (non-infinity non-NaN). + */ +#define HAS_FINITEL /**/ + /* FLEXFILENAMES: * This symbol, if defined, indicates that the system supports filenames * longer than 14 characters. */ #define FLEXFILENAMES /**/ +/* HAS_FP_CLASS: + * This symbol, if defined, indicates that the fp_class routine is + * available to classify doubles. Available for example in Digital UNIX. + * The returned values are defined in <math.h> and are: + * + * FP_SNAN Signaling NaN (Not-a-Number) + * FP_QNAN Quiet NaN (Not-a-Number) + * FP_POS_INF +infinity + * FP_NEG_INF -infinity + * FP_POS_NORM Positive normalized + * FP_NEG_NORM Negative normalized + * FP_POS_DENORM Positive denormalized + * FP_NEG_DENORM Negative denormalized + * FP_POS_ZERO +0.0 (positive zero) + * FP_NEG_ZERO -0.0 (negative zero) + */ +#define HAS_FP_CLASS /**/ + +/* HAS_FPCLASS: + * This symbol, if defined, indicates that the fpclass routine is + * available to classify doubles. Available for example in Solaris/SVR4. + * The returned values are defined in <ieeefp.h> and are: + * + * FP_SNAN signaling NaN + * FP_QNAN quiet NaN + * FP_NINF negative infinity + * FP_PINF positive infinity + * FP_NDENORM negative denormalized non-zero + * FP_PDENORM positive denormalized non-zero + * FP_NZERO negative zero + * FP_PZERO positive zero + * FP_NNORM negative normalized non-zero + * FP_PNORM positive normalized non-zero + */ +/*#define HAS_FPCLASS / **/ + +/* HAS_FPCLASSIFY: + * This symbol, if defined, indicates that the fpclassify routine is + * available to classify doubles. Available for example in HP-UX. + * The returned values are defined in <math.h> and are + * + * FP_NORMAL Normalized + * FP_ZERO Zero + * FP_INFINITE Infinity + * FP_SUBNORMAL Denormalized + * FP_NAN NaN + * + */ +/*#define HAS_FPCLASSIFY / **/ + +/* HAS_FPCLASSL: + * This symbol, if defined, indicates that the fpclassl routine is + * available to classify long doubles. Available for example in IRIX. + * The returned values are defined in <ieeefp.h> and are: + * + * FP_SNAN signaling NaN + * FP_QNAN quiet NaN + * FP_NINF negative infinity + * FP_PINF positive infinity + * FP_NDENORM negative denormalized non-zero + * FP_PDENORM positive denormalized non-zero + * FP_NZERO negative zero + * FP_PZERO positive zero + * FP_NNORM negative normalized non-zero + * FP_PNORM positive normalized non-zero + */ +/*#define HAS_FPCLASSL / **/ + /* HAS_FPOS64_T: * This symbol will be defined if the C compiler supports fpos64_t. */ @@ -1638,6 +1737,18 @@ */ #define HAS_ISASCII /**/ +/* HAS_ISFINITE: + * This symbol, if defined, indicates that the isfinite routine is + * available to check whether a double is finite (non-infinity non-NaN). + */ +/*#define HAS_ISFINITE / **/ + +/* HAS_ISINF: + * This symbol, if defined, indicates that the isinf routine is + * available to check whether a double is an infinity. + */ +/*#define HAS_ISINF / **/ + /* HAS_ISNAN: * This symbol, if defined, indicates that the isnan routine is * available to check whether a double is a NaN. @@ -2262,6 +2373,13 @@ #define USE_SEMCTL_SEMUN /**/ #define USE_SEMCTL_SEMID_DS /**/ +/* HAS_UNORDERED: + * This symbol, if defined, indicates that the unordered routine is + * available to check whether two doubles are unordered + * (effectively: whether either of them is NaN) + */ +#define HAS_UNORDERED /**/ + /* HAS_USTAT: * This symbol, if defined, indicates that the ustat system call is * available to query file system statistics by dev_t. @@ -2408,6 +2526,12 @@ #define DB_VERSION_MINOR_CFG 0 /**/ #define DB_VERSION_PATCH_CFG 0 /**/ +/* I_FP_CLASS: + * This symbol, if defined, indicates that <fp_class.h> exists and + * should be included. + */ +#define I_FP_CLASS /**/ + /* I_GRP: * This symbol, if defined, indicates to the C program that it should * include <grp.h>. @@ -3451,6 +3575,12 @@ */ /*#define HAS_USLEEP_PROTO / **/ +/* I_FP: + * This symbol, if defined, indicates that <fp.h> exists and + * should be included. + */ +#define I_FP /**/ + /* I_LANGINFO: * This symbol, if defined, indicates that <langinfo.h> exists and * should be included. |