Skip to content

Commit 1f122a7

Browse files
committed
Replace float.c's #ifdef finite check with a proper autoconf check, so it
works if finite() is a function. Patch from Christof Petig.
1 parent 54204e6 commit 1f122a7

File tree

4 files changed

+121
-88
lines changed

4 files changed

+121
-88
lines changed

src/backend/utils/adt/float.c

Lines changed: 5 additions & 5 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.49 1999/09/26 21:21:15 tgl Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.50 1999/10/02 17:45:31 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1157,11 +1157,11 @@ dpow(float64 arg1, float64 arg2)
11571157

11581158
tmp1 = *arg1;
11591159
tmp2 = *arg2;
1160-
#ifndef finite
1160+
#ifndef HAVE_FINITE
11611161
errno = 0;
11621162
#endif
11631163
*result = (float64data) pow(tmp1, tmp2);
1164-
#ifndef finite
1164+
#ifndef HAVE_FINITE
11651165
if (errno != 0) /* on some machines both EDOM & ERANGE can
11661166
* occur */
11671167
#else
@@ -1189,11 +1189,11 @@ dexp(float64 arg1)
11891189
result = (float64) palloc(sizeof(float64data));
11901190

11911191
tmp = *arg1;
1192-
#ifndef finite
1192+
#ifndef HAVE_FINITE
11931193
errno = 0;
11941194
#endif
11951195
*result = (float64data) exp(tmp);
1196-
#ifndef finite
1196+
#ifndef HAVE_FINITE
11971197
if (errno == ERANGE)
11981198
#else
11991199
/* infinity implies overflow, zero implies underflow */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy