aboutsummaryrefslogtreecommitdiffstats
path: root/erts/configure.in
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 /erts/configure.in
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 'erts/configure.in')
-rw-r--r--erts/configure.in13
1 files changed, 12 insertions, 1 deletions
diff --git a/erts/configure.in b/erts/configure.in
index 766e35fb2b..9864d03cde 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -2109,6 +2109,17 @@ AC_CHECK_FUNCS([ieee_handler fpsetmask finite isnan isinf res_gethostbyname dlop
flockfile fstat strlcpy strlcat setsid posix2time time2posix \
setlocale nl_langinfo poll mlockall])
+AC_MSG_CHECKING([for isfinite])
+AC_TRY_LINK([#include <math.h>],
+ [isfinite(0);], have_isfinite=yes, have_isfinite=no),
+
+if test $have_isfinite = yes; then
+ AC_DEFINE(HAVE_ISFINITE,[1],
+ [Define to 1 if you have the `isfinite' function.])
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+fi
case X$erl_xcomp_posix_memalign in
Xno) ;;
@@ -4817,7 +4828,7 @@ AH_BOTTOM([
#define HAVE_GETHRVTIME
#endif
-#ifndef HAVE_FINITE
+#if !defined(HAVE_ISFINITE) && !defined(HAVE_FINITE)
# if defined(HAVE_ISINF) && defined(HAVE_ISNAN)
# define USE_ISINF_ISNAN
# endif