diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/utils/adt/float.c | 25 | ||||
-rw-r--r-- | src/include/pg_config.h.in | 3 | ||||
-rw-r--r-- | src/include/port/win32.h | 3 |
3 files changed, 6 insertions, 25 deletions
diff --git a/src/backend/utils/adt/float.c b/src/backend/utils/adt/float.c index 5cd98605dc9..48b5fe878c5 100644 --- a/src/backend/utils/adt/float.c +++ b/src/backend/utils/adt/float.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/utils/adt/float.c,v 1.133 2007/01/02 20:50:35 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/utils/adt/float.c,v 1.134 2007/01/02 21:25:50 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -18,10 +18,6 @@ #include <float.h> #include <math.h> #include <limits.h> -/* for finite() on Solaris */ -#ifdef HAVE_IEEEFP_H -#include <ieeefp.h> -#endif #include "catalog/pg_type.h" #include "libpq/pqformat.h" @@ -34,12 +30,6 @@ #define M_PI 3.14159265358979323846 #endif -/* Recent HPUXen have isfinite() macro in place of more standard finite() */ -#if !defined(HAVE_FINITE) && defined(isfinite) -#define finite(x) isfinite(x) -#define HAVE_FINITE 1 -#endif - /* Visual C++ etc lacks NAN, and won't accept 0.0/0.0. NAN definition from * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang/html/vclrfNotNumberNANItems.asp */ @@ -167,11 +157,10 @@ is_infinite(double val) if (inf == 0) return 0; - - if (val > 0) + else if (val > 0) return 1; - - return -1; + else + return -1; } @@ -1709,11 +1698,7 @@ dtan(PG_FUNCTION_ARGS) errno = 0; result = tan(arg1); - if (errno != 0 -#ifdef HAVE_FINITE - || !finite(result) -#endif - ) + if (errno != 0) ereport(ERROR, (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), errmsg("input is out of range"))); diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in index a75f1dccfa9..a8e8014b8a6 100644 --- a/src/include/pg_config.h.in +++ b/src/include/pg_config.h.in @@ -116,9 +116,6 @@ /* Define to 1 if you have the `fdatasync' function. */ #undef HAVE_FDATASYNC -/* Define to 1 if you have finite(). */ -#undef HAVE_FINITE - /* Define to 1 if you have the `fpclass' function. */ #undef HAVE_FPCLASS diff --git a/src/include/port/win32.h b/src/include/port/win32.h index b23123bc4ab..eb086fc043f 100644 --- a/src/include/port/win32.h +++ b/src/include/port/win32.h @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.63 2006/10/19 20:03:08 tgl Exp $ */ +/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.64 2007/01/02 21:25:50 momjian Exp $ */ #if defined(_MSC_VER) || defined(__BORLANDC__) #define WIN32_ONLY_COMPILER @@ -287,7 +287,6 @@ typedef unsigned short mode_t; #define isinf(x) ((_fpclass(x) == _FPCLASS_PINF) || (_fpclass(x) == _FPCLASS_NINF)) #define isnan(x) _isnan(x) -#define finite(x) _finite(x) #ifndef BIG_ENDIAN #define BIG_ENDIAN 4321 |