Skip to content

Commit 33464ad

Browse files
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) llvm-svn: 22079
1 parent 60c9a3c commit 33464ad

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/lib/Support/IsInf.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ static int isinf(double x) { return !finite(x) && x==x; }
2929
// system header /usr/include/math.h
3030
# include <math.h>
3131
static int isinf(double x) { return !finite(x) && x==x; }
32+
#elif defined(__hpux)
33+
// HP-UX is "special"
34+
#include <math.h>
35+
static int isinf(double x) { return ((x)==INFINITY)||((x)==-INFINITY); }
3236
#else
3337
# error "Don't know how to get isinf()"
3438
#endif

0 commit comments

Comments
 (0)