aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Support/IsInf.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Support/IsInf.cpp b/lib/Support/IsInf.cpp
index 4142b91..7fd857e 100644
--- a/lib/Support/IsInf.cpp
+++ b/lib/Support/IsInf.cpp
@@ -19,6 +19,11 @@
#elif HAVE_STD_ISINF_IN_CMATH
# include <cmath>
using std::isinf;
+#elif HAVE_FINITE_IN_IEEEFP_H
+// A handy workaround I found at http://www.unixguide.net/sun/faq ...
+// apparently this has been a problem with Solaris for years.
+# include <ieeefp.h>
+static int isinf(double x) { return !finite(x) && x==x; }
#else
# error "Don't know how to get isinf()"
#endif