aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/adt/float.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/backend/utils/adt/float.c b/src/backend/utils/adt/float.c
index 64da51ada45..6917e52f247 100644
--- a/src/backend/utils/adt/float.c
+++ b/src/backend/utils/adt/float.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.23 1997/09/24 15:40:59 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.24 1997/09/26 20:32:02 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1518,14 +1518,31 @@ double x;
#ifndef HAVE_ISINF
#if defined(aix)
+
#ifdef CLASS_CONFLICT
/* we want the math symbol */
#undef class
#endif /* CLASS_CONFICT */
+/* The gcc doesn't support isinf() (without libgcc?) so we
+ * have to do it - Gerhard Reitofer
+ */
+#ifdef __GNUC__
+
static int
-isinf(x)
-double x;
+isinf(double x)
+{
+ if (x == HUGE_VAL)
+ return(1);
+ if (x == -HUGE_VAL)
+ return(-1);
+ return(0);
+}
+
+#else /* __GNUC__ */
+
+static int
+isinf(double x)
{
int fpclass = class(x);
@@ -1536,6 +1553,8 @@ double x;
return (0);
}
+#endif /* __GNUC__ */
+
#endif /* aix */
#if defined(ultrix4)