Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc30b8f9

Browse files
committed
AIX float fix.
1 parent5e2c0a8 commitc30b8f9

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

‎src/backend/utils/adt/float.c

Lines changed: 22 additions & 3 deletions
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 @@ doublex;
15181518
#ifndefHAVE_ISINF
15191519

15201520
#if defined(aix)
1521+
15211522
#ifdefCLASS_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
staticint
1527-
isinf(x)
1528-
doublex;
1533+
isinf(doublex)
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+
staticint
1545+
isinf(doublex)
15291546
{
15301547
intfpclass=class(x);
15311548

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

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

15411560
#if defined(ultrix4)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp