diff options
author | Allen Smith <allens@cpan.org> | 2002-09-07 01:25:45 -0400 |
---|---|---|
committer | hv <hv@crypt.org> | 2002-09-08 17:10:38 +0000 |
commit | 20f6aaab8d64a33be1150bb7a380a1b5d03267cb (patch) | |
tree | d31bbbbc33401f4b56b0e88fd778a96a0eaf4b5d /perl.h | |
parent | d3d0e6f1233c0621cb4930e677ea82e761029cf7 (diff) | |
download | perl-20f6aaab8d64a33be1150bb7a380a1b5d03267cb.tar.gz |
Re: [PATCH: perl #17849] (corrected) Long double bugs - sprintf.t _and_ num.t
From: "Allen Smith" <easmith@beatrice.rutgers.edu>
Message-Id: <10209070525.ZM1584639@puck2.rutgers.edu>
p4raw-id: //depot/perl@17874
Diffstat (limited to 'perl.h')
-rw-r--r-- | perl.h | 23 |
1 files changed, 22 insertions, 1 deletions
@@ -1186,6 +1186,27 @@ typedef UVTYPE UV; # endif #endif +/* + * This is for making sure we have a good DBL_MAX value, if possible, + * either for usage as NV_MAX or for usage in figuring out if we can + * fit a given long double into a double, if bug-fixing makes it + * necessary to do so. - Allen <allens@cpan.org> + */ + +#if defined(I_VALUES) +# if !defined(USE_LONG_DOUBLE) || defined(HAS_LDBL_SPRINTF_BUG) +# if (!defined(DBL_MIN) || !defined(DBL_MAX)) +# include <values.h> +# if defined(MAXDOUBLE) && !defined(DBL_MAX) +# define DBL_MAX MAXDOUBLE +# endif +# if defined(MINDOUBLE) && !defined(DBL_MIN) +# define DBL_MIN MINDOUBLE +# endif +# endif +# endif +#endif + typedef NVTYPE NV; #ifdef I_IEEEFP @@ -1217,7 +1238,7 @@ typedef NVTYPE NV; # endif # ifdef LDBL_MAX # define NV_MAX LDBL_MAX -# define NV_MIN LDBL_MIN +/* Having LDBL_MAX doesn't necessarily mean that we have LDBL_MIN... -Allen */ # else # ifdef HUGE_VALL # define NV_MAX HUGE_VALL |