diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2014-09-01 09:55:23 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2014-09-01 14:11:56 -0400 |
commit | a985cadd390dc83e2be80ce22961ff6da5e6feb5 (patch) | |
tree | e6a1ebad3d9c92411ca37325c382939844d995fc /perl.h | |
parent | c0cd65b2410a7d7f64d2d3336de4f12861b430b2 (diff) | |
download | perl-a985cadd390dc83e2be80ce22961ff6da5e6feb5.tar.gz |
Do not use HUGE_VAL/VALL for NV_INF.
Because some platforms (like HP-UX 10.*) have HUGE_VAL as DBL_MAX,
which, while large, is not quite the infinity. So have infinity
own our very own.
Similarly for NV_NAN.
Diffstat (limited to 'perl.h')
-rw-r--r-- | perl.h | 15 |
1 files changed, 6 insertions, 9 deletions
@@ -4106,11 +4106,8 @@ END_EXTERN_C #if !defined(NV_INF) && defined(INF) # define NV_INF (NV)INF #endif -#if !defined(NV_INF) && defined(USE_LONG_DOUBLE) && defined(HUGE_VALL) -# define NV_INF (NV)HUGE_VALL -#endif -#if !defined(NV_INF) && defined(HUGE_VAL) -# define NV_INF (NV)HUGE_VAL +#if !defined(NV_INF) +# define NV_INF (NV)PL_infinity #endif #if !defined(NV_NAN) && defined(USE_LONG_DOUBLE) @@ -4136,14 +4133,14 @@ END_EXTERN_C #if !defined(NV_NAN) && defined(QNAN) # define NV_NAN (NV)QNAN #endif -#if !defined(NV_NAN) && defined(SNAN) -# define NV_NAN (NV)SNAN -#endif #if !defined(NV_NAN) && defined(NAN) # define NV_NAN (NV)NAN #endif +#if !defined(NV_NAN) && defined(SNAN) +# define NV_NAN (NV)SNAN +#endif #if !defined(NV_NAN) && defined(NV_INF) -# define NV_NAN (NV_INF-NV_INF) +# define NV_NAN PL_nan #endif #ifndef __cplusplus |