diff options
author | Bruce Momjian <bruce@momjian.us> | 1999-07-18 20:43:13 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1999-07-18 20:43:13 +0000 |
commit | 7badb1e792acfadec6e86214ca1292e8465b7f97 (patch) | |
tree | 4f28c970b74abc2ff6ef712e34f633d393a3a085 /src/backend/port/isinf.c | |
parent | b721c9e164c47717e18bcdd9c5827a5f702cbd81 (diff) | |
download | postgresql-7badb1e792acfadec6e86214ca1292e8465b7f97.tar.gz postgresql-7badb1e792acfadec6e86214ca1292e8465b7f97.zip |
Fix configure problem.
Diffstat (limited to 'src/backend/port/isinf.c')
-rw-r--r-- | src/backend/port/isinf.c | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/src/backend/port/isinf.c b/src/backend/port/isinf.c index 1fa31f82634..e2193267073 100644 --- a/src/backend/port/isinf.c +++ b/src/backend/port/isinf.c @@ -1,18 +1,12 @@ -/* $Id: isinf.c,v 1.10 1999/07/18 17:38:23 momjian Exp $ */ +/* $Id: isinf.c,v 1.11 1999/07/18 20:43:12 momjian Exp $ */ #include <math.h> - #include "config.h" -#ifdef NOT_USED - +#if HAVE_FPCLASS #if HAVE_IEEEFP_H #include <ieeefp.h> #endif -#if HAVE_FP_CLASS_H -#include <fp_class.h> -#endif - int isinf(double d) { @@ -29,6 +23,12 @@ isinf(double d) return 0; } +#else + +#if defined(HAVE_FP_CLASS) || defined(HAVE_FP_CLASS_D) +#if HAVE_FP_CLASS_H +#include <fp_class.h> +#endif int isinf(x) double x; @@ -49,3 +49,19 @@ double x; } #endif +#endif + +#if defined(HAVE_CLASS) +int +isinf(double x) +{ + int fpclass = class(x); + + if (fpclass == FP_PLUS_INF) + return 1; + if (fpclass == FP_MINUS_INF) + return -1; + return 0; +} + +#endif |