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

Commit cac2d91

Browse files
committed
finite() no longer used; remove finite() platform-specific
infrastructure.
1 parent 2955f1e commit cac2d91

File tree

5 files changed

+7
-96
lines changed

5 files changed

+7
-96
lines changed

configure

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -15489,65 +15489,6 @@ done
1548915489
fi
1549015490

1549115491

15492-
echo "$as_me:$LINENO: checking for finite" >&5
15493-
echo $ECHO_N "checking for finite... $ECHO_C" >&6
15494-
cat >conftest.$ac_ext <<_ACEOF
15495-
/* confdefs.h. */
15496-
_ACEOF
15497-
cat confdefs.h >>conftest.$ac_ext
15498-
cat >>conftest.$ac_ext <<_ACEOF
15499-
/* end confdefs.h. */
15500-
15501-
#include <math.h>
15502-
double glob_double;
15503-
15504-
int
15505-
main ()
15506-
{
15507-
return finite(glob_double) ? 0 : 1;
15508-
;
15509-
return 0;
15510-
}
15511-
_ACEOF
15512-
rm -f conftest.$ac_objext conftest$ac_exeext
15513-
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15514-
(eval $ac_link) 2>conftest.er1
15515-
ac_status=$?
15516-
grep -v '^ *+' conftest.er1 >conftest.err
15517-
rm -f conftest.er1
15518-
cat conftest.err >&5
15519-
echo "$as_me:$LINENO: \$? = $ac_status" >&5
15520-
(exit $ac_status); } &&
15521-
{ ac_try='test -z "$ac_c_werror_flag"
15522-
|| test ! -s conftest.err'
15523-
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15524-
(eval $ac_try) 2>&5
15525-
ac_status=$?
15526-
echo "$as_me:$LINENO: \$? = $ac_status" >&5
15527-
(exit $ac_status); }; } &&
15528-
{ ac_try='test -s conftest$ac_exeext'
15529-
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15530-
(eval $ac_try) 2>&5
15531-
ac_status=$?
15532-
echo "$as_me:$LINENO: \$? = $ac_status" >&5
15533-
(exit $ac_status); }; }; then
15534-
15535-
cat >>confdefs.h <<\_ACEOF
15536-
#define HAVE_FINITE 1
15537-
_ACEOF
15538-
15539-
echo "$as_me:$LINENO: result: yes" >&5
15540-
echo "${ECHO_T}yes" >&6
15541-
else
15542-
echo "$as_me: failed program was:" >&5
15543-
sed 's/^/| /' conftest.$ac_ext >&5
15544-
15545-
echo "$as_me:$LINENO: result: no" >&5
15546-
echo "${ECHO_T}no" >&6
15547-
fi
15548-
rm -f conftest.err conftest.$ac_objext \
15549-
conftest$ac_exeext conftest.$ac_ext
15550-
1555115492
echo "$as_me:$LINENO: checking for sigsetjmp" >&5
1555215493
echo $ECHO_N "checking for sigsetjmp... $ECHO_C" >&6
1555315494
cat >conftest.$ac_ext <<_ACEOF

configure.in

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
dnl $PostgreSQL: pgsql/configure.in,v 1.493 2006/12/21 16:05:12 petere Exp $
2+
dnl $PostgreSQL: pgsql/configure.in,v 1.494 2007/01/02 21:25:50 momjian Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -1033,17 +1033,6 @@ if test "$with_readline" = yes; then
10331033
fi
10341034

10351035

1036-
dnl Cannot use AC_CHECK_FUNC because finite may be a macro
1037-
AC_MSG_CHECKING(for finite)
1038-
AC_TRY_LINK([
1039-
#include <math.h>
1040-
double glob_double;
1041-
],
1042-
[return finite(glob_double) ? 0 : 1;],
1043-
[AC_DEFINE(HAVE_FINITE, 1, [Define to 1 if you have finite().])
1044-
AC_MSG_RESULT(yes)],
1045-
[AC_MSG_RESULT(no)])
1046-
10471036
dnl Cannot use AC_CHECK_FUNC because sigsetjmp may be a macro
10481037
dnl (especially on GNU libc)
10491038
dnl See also comments in c.h.

src/backend/utils/adt/float.c

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/utils/adt/float.c,v 1.133 2007/01/02 20:50:35 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/utils/adt/float.c,v 1.134 2007/01/02 21:25:50 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -18,10 +18,6 @@
1818
#include <float.h>
1919
#include <math.h>
2020
#include <limits.h>
21-
/* for finite() on Solaris */
22-
#ifdef HAVE_IEEEFP_H
23-
#include <ieeefp.h>
24-
#endif
2521

2622
#include "catalog/pg_type.h"
2723
#include "libpq/pqformat.h"
@@ -34,12 +30,6 @@
3430
#define M_PI 3.14159265358979323846
3531
#endif
3632

37-
/* Recent HPUXen have isfinite() macro in place of more standard finite() */
38-
#if !defined(HAVE_FINITE) && defined(isfinite)
39-
#define finite(x) isfinite(x)
40-
#define HAVE_FINITE 1
41-
#endif
42-
4333
/* Visual C++ etc lacks NAN, and won't accept 0.0/0.0. NAN definition from
4434
* http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang/html/vclrfNotNumberNANItems.asp
4535
*/
@@ -167,11 +157,10 @@ is_infinite(double val)
167157

168158
if (inf == 0)
169159
return 0;
170-
171-
if (val > 0)
160+
else if (val > 0)
172161
return 1;
173-
174-
return -1;
162+
else
163+
return -1;
175164
}
176165

177166

@@ -1709,11 +1698,7 @@ dtan(PG_FUNCTION_ARGS)
17091698

17101699
errno = 0;
17111700
result = tan(arg1);
1712-
if (errno != 0
1713-
#ifdef HAVE_FINITE
1714-
|| !finite(result)
1715-
#endif
1716-
)
1701+
if (errno != 0)
17171702
ereport(ERROR,
17181703
(errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
17191704
errmsg("input is out of range")));

src/include/pg_config.h.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,6 @@
116116
/* Define to 1 if you have the `fdatasync' function. */
117117
#undef HAVE_FDATASYNC
118118

119-
/* Define to 1 if you have finite(). */
120-
#undef HAVE_FINITE
121-
122119
/* Define to 1 if you have the `fpclass' function. */
123120
#undef HAVE_FPCLASS
124121

src/include/port/win32.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.63 2006/10/19 20:03:08 tgl Exp $ */
1+
/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.64 2007/01/02 21:25:50 momjian Exp $ */
22

33
#if defined(_MSC_VER) || defined(__BORLANDC__)
44
#define WIN32_ONLY_COMPILER
@@ -287,7 +287,6 @@ typedef unsigned short mode_t;
287287

288288
#define isinf(x) ((_fpclass(x) == _FPCLASS_PINF) || (_fpclass(x) == _FPCLASS_NINF))
289289
#define isnan(x) _isnan(x)
290-
#define finite(x) _finite(x)
291290

292291
#ifndef BIG_ENDIAN
293292
#define BIG_ENDIAN 4321

0 commit comments

Comments
 (0)