[llvm-commits] CVS: llvm/lib/Support/IsInf.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Tue Jul 20 20:33:02 PDT 2004
Changes in directory llvm/lib/Support:
IsInf.cpp updated: 1.1 -> 1.2
---
Log message:
Solaris hack for isinf()
---
Diffs of the changes: (+5 -0)
Index: llvm/lib/Support/IsInf.cpp
diff -u llvm/lib/Support/IsInf.cpp:1.1 llvm/lib/Support/IsInf.cpp:1.2
--- llvm/lib/Support/IsInf.cpp:1.1 Tue Jul 20 22:13:50 2004
+++ llvm/lib/Support/IsInf.cpp Tue Jul 20 22:32:51 2004
@@ -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
More information about the llvm-commits
mailing list