diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2004-07-21 03:32:51 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2004-07-21 03:32:51 +0000 |
commit | 84a69f1494e0205e796991c4d3e198e0319430c6 (patch) | |
tree | 39cab9a757daccf072defdd270bb76d2a4175e7f /llvm/lib/Support/IsInf.cpp | |
parent | a5adf7948ca2ed5a02de00ea9adec6c5c1f69138 (diff) | |
download | bcm5719-llvm-84a69f1494e0205e796991c4d3e198e0319430c6.tar.gz bcm5719-llvm-84a69f1494e0205e796991c4d3e198e0319430c6.zip |
Solaris hack for isinf()
llvm-svn: 15058
Diffstat (limited to 'llvm/lib/Support/IsInf.cpp')
-rw-r--r-- | llvm/lib/Support/IsInf.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Support/IsInf.cpp b/llvm/lib/Support/IsInf.cpp index 4142b911e2c..7fd857e931b 100644 --- a/llvm/lib/Support/IsInf.cpp +++ b/llvm/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 |