diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2014-09-02 17:48:25 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2014-09-02 21:02:24 -0400 |
commit | 26e0f0d373d8649f6ddc462743c555bd39166946 (patch) | |
tree | 4a28d9ee0c1cef4ae605804b1450c13c3ca285ef /ext/POSIX/POSIX.xs | |
parent | 51a0624d13d30bf656b67b2f094c54e7ab0fd859 (diff) | |
download | perl-26e0f0d373d8649f6ddc462743c555bd39166946.tar.gz |
POSIX math: Define my_fpclassify only if no c99_classify already.
("c99_classify already" = we saw HAS_FPCLASSIFY and fpclassify macro,
which together smell like C99)
Diffstat (limited to 'ext/POSIX/POSIX.xs')
-rw-r--r-- | ext/POSIX/POSIX.xs | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index 77d4ec846a..8d8d889f50 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -139,17 +139,17 @@ log1p log2 logb lrint nan nearbyint nextafter nexttoward remainder remquo rint round scalbn signbit tgamma trunc - * Berkeley/SVID extensions: + * Berkeley/SVID extensions: - j0 j1 jn y0 y1 yn + j0 j1 jn y0 y1 yn - * Configure already (5.21.0) scans for: + * Configure already (5.21.0) scans for: - fpclassify isfinite isinf isnan ilogb*l* signbit + fpclassify isfinite isinf isnan ilogb*l* signbit - * For floating-point round mode (which matters for e.g. lrint and rint) + * For floating-point round mode (which matters for e.g. lrint and rint) - fegetround fesetround + fegetround fesetround */ @@ -521,6 +521,8 @@ static NV my_fmin(NV x, NV y) # define c99_fmin my_fmin #endif +#ifndef c99_fpclassify + static IV my_fpclassify(NV x) { #if defined(HAS_FPCLASSIFY) && defined(FP_PLUS_INF) /* E.g. HP-UX */ @@ -590,6 +592,8 @@ static IV my_fpclassify(NV x) #endif } +#endif + #ifndef c99_hypot static NV my_hypot(NV x, NV y) { |