[llvm-commits] CVS: llvm/lib/Support/IsInf.cpp
Duraid Madina
duraid at octopus.com.au
Sun May 15 23:46:08 PDT 2005
Changes in directory llvm/lib/Support:
IsInf.cpp updated: 1.6 -> 1.7
---
Log message:
HP-UX system headers make a mess of isinf(), so much so that gcc fixincludes
can't patch it up for c++ (works in C though)
---
Diffs of the changes: (+4 -0)
IsInf.cpp | 4 ++++
1 files changed, 4 insertions(+)
Index: llvm/lib/Support/IsInf.cpp
diff -u llvm/lib/Support/IsInf.cpp:1.6 llvm/lib/Support/IsInf.cpp:1.7
--- llvm/lib/Support/IsInf.cpp:1.6 Thu Apr 21 17:52:05 2005
+++ llvm/lib/Support/IsInf.cpp Mon May 16 01:45:57 2005
@@ -29,6 +29,10 @@
// system header /usr/include/math.h
# include <math.h>
static int isinf(double x) { return !finite(x) && x==x; }
+#elif defined(__hpux)
+// HP-UX is "special"
+#include <math.h>
+static int isinf(double x) { return ((x)==INFINITY)||((x)==-INFINITY); }
#else
# error "Don't know how to get isinf()"
#endif
More information about the llvm-commits
mailing list