summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2014-09-12 07:01:41 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2014-09-12 07:26:06 -0400
commit16334e6ed27593bc12382ef6095c56bc202a11d2 (patch)
tree59cc6cdced42d364645143a47e2e3d27d5b2941c /perl.h
parentd3bd9faeb630a8d4cafd65f4110cbba585a82907 (diff)
downloadperl-16334e6ed27593bc12382ef6095c56bc202a11d2.tar.gz
Perl_isfinitel should not use the fpclass macross blindly.
(Whether the macros are safe for long doubles, is complicated.)
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/perl.h b/perl.h
index ff01e4f1c5..39bf2410f4 100644
--- a/perl.h
+++ b/perl.h
@@ -2312,10 +2312,10 @@ int isnan(double d);
# define Perl_isfinitel(x) finitel(x)
# elif defined(HAS_INFL) && defined(HAS_NANL)
# define Perl_isfinitel(x) !(isinfl(x)||isnanl(x))
-# elif defined(Perl_fp_class_inf) && defined(Perl_fp_class_nan)
-# define Perl_isfinitel(x) !(Perl_fp_class_inf(x)||Perl_fp_class_nan(x))
# elif defined(LDBL_MAX)
# define Perl_isfinitel(x) ((x) <= LDBL_MAX && (x) >= -LDBL_MAX)
+# else
+# define Perl_isfinitel(x) ((x) * 0 == 0)
# endif
#endif