summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2014-08-22 16:42:22 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2014-08-22 16:57:41 -0400
commitd074b8ed828ac1f755cafa043f09e0eba8226c51 (patch)
tree90172ca1ffdd0b82c5f42e366a1b631ee5f541d3 /perl.h
parent9ff909cfc2bd7949d8ac29824e865f43be5c444c (diff)
downloadperl-d074b8ed828ac1f755cafa043f09e0eba8226c51.tar.gz
Fix infnan.t Win32 failure.
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/perl.h b/perl.h
index dd2c37a7fc..adb1f240f0 100644
--- a/perl.h
+++ b/perl.h
@@ -2180,7 +2180,9 @@ int isnan(double d);
#endif
#ifndef Perl_isinf
-# if defined(Perl_isfinite) && defined(Perl_isnan)
+# if defined(Perl_fp_class_inf)
+# define Perl_isinf(x) Perl_fp_class_inf(x)
+# elif defined(Perl_isfinite) && defined(Perl_isnan)
# define Perl_isinf(x) !(Perl_isfinite(x)||Perl_isnan(x))
# endif
#endif
@@ -3993,6 +3995,15 @@ START_EXTERN_C
END_EXTERN_C
#endif
+#ifdef WIN32
+# if !defined(NV_INF) && defined(HUGE_VAL)
+# define NV_INF HUGE_VAL
+# endif
+# ifndef NV_NAN
+# define NV_NAN (NV_INF-NV_INF)
+# endif
+#endif
+
#if !defined(NV_INF) && defined(USE_LONG_DOUBLE) && defined(LDBL_INFINITY)
# define NV_INF LDBL_INFINITY
#endif
@@ -4041,6 +4052,9 @@ END_EXTERN_C
#if !defined(NV_NAN) && defined(NAN)
# define NV_NAN (NV)NAN
#endif
+#if !defined(NV_NAN) && defined(NV_INF)
+# define NV_NAN (NV_INF-NV_INF)
+#endif
#ifndef __cplusplus
# if !defined(WIN32) && !defined(VMS)