File tree 1 file changed +22
-3
lines changed
1 file changed +22
-3
lines changed Original file line number Diff line number Diff line change 7
7
*
8
8
*
9
9
* IDENTIFICATION
10
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.23 1997/09/24 15:40:59 momjian Exp $
10
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.24 1997/09/26 20:32:02 momjian Exp $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
@@ -1518,14 +1518,31 @@ double x;
1518
1518
#ifndef HAVE_ISINF
1519
1519
1520
1520
#if defined(aix )
1521
+
1521
1522
#ifdef CLASS_CONFLICT
1522
1523
/* we want the math symbol */
1523
1524
#undef class
1524
1525
#endif /* CLASS_CONFICT */
1525
1526
1527
+ /* The gcc doesn't support isinf() (without libgcc?) so we
1528
+ * have to do it - Gerhard Reitofer
1529
+ */
1530
+ #ifdef __GNUC__
1531
+
1526
1532
static int
1527
- isinf (x )
1528
- double x ;
1533
+ isinf (double x )
1534
+ {
1535
+ if (x == HUGE_VAL )
1536
+ return (1 );
1537
+ if (x == - HUGE_VAL )
1538
+ return (-1 );
1539
+ return (0 );
1540
+ }
1541
+
1542
+ #else /* __GNUC__ */
1543
+
1544
+ static int
1545
+ isinf (double x )
1529
1546
{
1530
1547
int fpclass = class (x );
1531
1548
@@ -1536,6 +1553,8 @@ double x;
1536
1553
return (0 );
1537
1554
}
1538
1555
1556
+ #endif /* __GNUC__ */
1557
+
1539
1558
#endif /* aix */
1540
1559
1541
1560
#if defined(ultrix4 )
You can’t perform that action at this time.
0 commit comments