This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
infnan: define NV_NAN (and NV_QNAN, NV_SNAN) if sunmath
authorJarkko Hietaniemi <jhi@iki.fi>
Sun, 1 Feb 2015 17:17:41 +0000 (12:17 -0500)
committerJarkko Hietaniemi <jhi@iki.fi>
Mon, 2 Feb 2015 22:02:58 +0000 (17:02 -0500)
perl.h

diff --git a/perl.h b/perl.h
index f5c64d4..d4f7f52 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -4346,6 +4346,11 @@ static const union { unsigned int __i; float __f; } __PL_inf_u =
 #if !defined(NV_NAN) && defined(SNAN)
 #  define NV_NAN (NV)SNAN
 #endif
 #if !defined(NV_NAN) && defined(SNAN)
 #  define NV_NAN (NV)SNAN
 #endif
+#if !defined(NV_NAN) && defined(I_SUNMATH)
+#  define NV_NAN (NV)quiet_nan()
+#  define NV_QNAN (NV)quiet_nan()
+#  define NV_SNAN (NV)signaling_nan()
+#endif
 #if !defined(NV_NAN)
 #  if INTSIZE == 4
 /* See the discussion near __PL_inf_u. */
 #if !defined(NV_NAN)
 #  if INTSIZE == 4
 /* See the discussion near __PL_inf_u. */