aboutsummaryrefslogtreecommitdiff
path: root/src/backend/port/isinf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/port/isinf.c')
-rw-r--r--src/backend/port/isinf.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/backend/port/isinf.c b/src/backend/port/isinf.c
index 441883fc20c..5bcb813a60d 100644
--- a/src/backend/port/isinf.c
+++ b/src/backend/port/isinf.c
@@ -1,4 +1,4 @@
-/* $Id: isinf.c,v 1.13 1999/07/30 03:45:44 momjian Exp $ */
+/* $Id: isinf.c,v 1.14 1999/12/16 01:25:02 momjian Exp $ */
#include <math.h>
@@ -51,7 +51,7 @@ double x;
return 0;
}
-#else defined(HAVE_CLASS)
+#elif defined(HAVE_CLASS)
int
isinf(double x)
{
@@ -66,3 +66,18 @@ isinf(double x)
#endif
#endif
+
+#ifdef __QNX__
+#include <float.h>
+
+int
+isinf(double x)
+{
+ if (x == HUGE_VAL)
+ return 1;
+ if (x == -HUGE_VAL)
+ return -1;
+ return 0;
+}
+
+#endif