Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit c30b8f9

Browse files
committed
AIX float fix.
1 parent 5e2c0a8 commit c30b8f9

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

src/backend/utils/adt/float.c

+22-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* 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 $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1518,14 +1518,31 @@ double x;
15181518
#ifndef HAVE_ISINF
15191519

15201520
#if defined(aix)
1521+
15211522
#ifdef CLASS_CONFLICT
15221523
/* we want the math symbol */
15231524
#undef class
15241525
#endif /* CLASS_CONFICT */
15251526

1527+
/* The gcc doesn't support isinf() (without libgcc?) so we
1528+
* have to do it - Gerhard Reitofer
1529+
*/
1530+
#ifdef __GNUC__
1531+
15261532
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)
15291546
{
15301547
int fpclass = class(x);
15311548

@@ -1536,6 +1553,8 @@ double x;
15361553
return (0);
15371554
}
15381555

1556+
#endif /* __GNUC__ */
1557+
15391558
#endif /* aix */
15401559

15411560
#if defined(ultrix4)

0 commit comments

Comments
 (0)