Solaris hack for isinf()
authorBrian Gaeke <gaeke@uiuc.edu>
Wed, 21 Jul 2004 03:32:51 +0000 (03:32 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Wed, 21 Jul 2004 03:32:51 +0000 (03:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15058 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/IsInf.cpp

index 4142b911e2cbc04bb85ccdc68cb6951cd274e3f7..7fd857e931bde83336d4e6a1893c9188ab20298b 100644 (file)
 #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