summaryrefslogtreecommitdiff
path: root/lib/Support
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2004-07-21 03:32:51 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2004-07-21 03:32:51 +0000
commit0d3ac4cc30b893ea02b5adeeb9c407db357b298c (patch)
treef0ba2db8de0a40a9a2638d479e870dd23cba2a23 /lib/Support
parentdfb3397c5bbaf8d3aa0ce9e3e98555313af91638 (diff)
downloadllvm-0d3ac4cc30b893ea02b5adeeb9c407db357b298c.tar.gz
llvm-0d3ac4cc30b893ea02b5adeeb9c407db357b298c.tar.bz2
llvm-0d3ac4cc30b893ea02b5adeeb9c407db357b298c.tar.xz
Solaris hack for isinf()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15058 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-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 4142b911e2..7fd857e931 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