summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2015-10-19 08:05:19 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2015-10-19 09:02:34 -0400
commita1115378806931e7274378ca670c34bdd6af0de2 (patch)
tree25644dcc6080684117745fd2a6d18d5c2927c74c
parenta6d3278e2b83239d3d01366fd1a96fdf05a5994a (diff)
downloadperl-a1115378806931e7274378ca670c34bdd6af0de2.tar.gz
IRIX long double: use the C99/C11-style generic math macros.
Without this the IRIX libmath _isinfl/_isnanl APIs are not used, and the explicit comparison against NV_MAX/-NV_MAX is used instead, which seems to work, but is definitely ickier and probably slower. In the ideal world we could have a Configure test for these math macros.
-rw-r--r--perl.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/perl.h b/perl.h
index c14ba061fa..620028d0ce 100644
--- a/perl.h
+++ b/perl.h
@@ -1965,11 +1965,15 @@ extern long double Perl_my_frexpl(long double x, int *e);
# ifndef Perl_isnan
# if defined(HAS_ISNANL) && !(defined(isnan) && defined(HAS_C99))
# define Perl_isnan(x) isnanl(x)
+# elif defined(__sgi) && defined(__c99) /* XXX Configure test needed */
+# define Perl_isnan(x) isnan(x)
# endif
# endif
# ifndef Perl_isinf
# if defined(HAS_ISINFL) && !(defined(isinf) && defined(HAS_C99))
# define Perl_isinf(x) isinfl(x)
+# elif defined(__sgi) && defined(__c99) /* XXX Configure test needed */
+# define Perl_isinf(x) isinf(x)
# elif defined(LDBL_MAX) && !defined(NAN_COMPARE_BROKEN)
# define Perl_isinf(x) ((x) > LDBL_MAX || (x) < -LDBL_MAX)
# endif