aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_interface/src/decode/decode_big.c
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2014-10-28 11:42:58 +0100
committerLukas Larsson <[email protected]>2014-10-28 11:42:58 +0100
commit3a4433d67cb2f14c5ed69e8eae7b772eebcaa30b (patch)
treef23b51e249fbf6cae8cb7377b61d38cd8d574d0e /lib/erl_interface/src/decode/decode_big.c
parent3f5685c7354dc481294013cf86d2f9621300c139 (diff)
parent4d73c647b55977d23c4295073945bd8aeb91ff83 (diff)
downloadotp-3a4433d67cb2f14c5ed69e8eae7b772eebcaa30b.tar.gz
otp-3a4433d67cb2f14c5ed69e8eae7b772eebcaa30b.tar.bz2
otp-3a4433d67cb2f14c5ed69e8eae7b772eebcaa30b.zip
Merge branch 'sv/isfinite/OTP-12268' into maint
* sv/isfinite/OTP-12268: Use isfinite() instead of finite() when available
Diffstat (limited to 'lib/erl_interface/src/decode/decode_big.c')
-rw-r--r--lib/erl_interface/src/decode/decode_big.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/erl_interface/src/decode/decode_big.c b/lib/erl_interface/src/decode/decode_big.c
index b54ac85be2..b87d97d634 100644
--- a/lib/erl_interface/src/decode/decode_big.c
+++ b/lib/erl_interface/src/decode/decode_big.c
@@ -151,13 +151,18 @@ int ei_big_comp(erlang_big *x, erlang_big *y)
#endif
#ifdef USE_ISINF_ISNAN /* simulate finite() */
-# define finite(f) (!isinf(f) && !isnan(f))
-# define HAVE_FINITE
+# define isfinite(f) (!isinf(f) && !isnan(f))
+# define HAVE_ISFINITE
+#elif defined(isfinite) && !defined(HAVE_ISFINITE)
+# define HAVE_ISFINITE
+#elif !defined(HAVE_ISFINITE) && defined(HAVE_FINITE)
+# define isfinite finite
+# define HAVE_ISFINITE
#endif
#ifdef NO_FPE_SIGNALS
# define ERTS_FP_CHECK_INIT() do {} while (0)
-# define ERTS_FP_ERROR(f, Action) if (!finite(f)) { Action; } else {}
+# define ERTS_FP_ERROR(f, Action) if (!isfinite(f)) { Action; } else {}
# define ERTS_SAVE_FP_EXCEPTION()
# define ERTS_RESTORE_FP_EXCEPTION()
#else