diff options
author | Björn-Egil Dahlberg <[email protected]> | 2015-06-02 15:03:06 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2015-06-02 15:03:06 +0200 |
commit | d1ec79afdeb91521ed55d8664c89f2afba792fda (patch) | |
tree | 59b3a6eea456b69939fabfd6eccb541e1ae6b1c4 /lib | |
parent | 20dc34bfc200758f6a837d193e042d1e4653562f (diff) | |
download | otp-d1ec79afdeb91521ed55d8664c89f2afba792fda.tar.gz otp-d1ec79afdeb91521ed55d8664c89f2afba792fda.tar.bz2 otp-d1ec79afdeb91521ed55d8664c89f2afba792fda.zip |
erl_interface: Surround isfinite with HAVE_ISFINITE conditional
Diffstat (limited to 'lib')
-rw-r--r-- | lib/erl_interface/src/legacy/erl_eterm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/erl_interface/src/legacy/erl_eterm.c b/lib/erl_interface/src/legacy/erl_eterm.c index 060e311f69..66cca7decf 100644 --- a/lib/erl_interface/src/legacy/erl_eterm.c +++ b/lib/erl_interface/src/legacy/erl_eterm.c @@ -26,7 +26,9 @@ #include <stdlib.h> #include <string.h> #include <ctype.h> +#if defined(HAVE_ISFINITE) #include <math.h> +#endif #include "ei_locking.h" #include "ei_resolve.h" @@ -126,12 +128,14 @@ ETERM *erl_mk_float (double d) { ETERM *ep; +#if defined(HAVE_ISFINITE) /* Erlang does not handle Inf and NaN, so we return an error * rather than letting the Erlang VM complain about a bad external * term. */ if(!isfinite(d)) { return NULL; } +#endif ep = erl_alloc_eterm(ERL_FLOAT); ERL_COUNT(ep) = 1; |