diff options
author | Bruce Momjian <bruce@momjian.us> | 2002-07-18 04:13:59 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2002-07-18 04:13:59 +0000 |
commit | 404e9a12a5aef6d77af9b407c5737cb688f8e1cc (patch) | |
tree | a79dc34675672225ef7d7f802832f65efd4da2fb /src/backend/port/isinf.c | |
parent | 7f43165dd272f6df9e3df8a0fa8386ad60276e4a (diff) | |
download | postgresql-404e9a12a5aef6d77af9b407c5737cb688f8e1cc.tar.gz postgresql-404e9a12a5aef6d77af9b407c5737cb688f8e1cc.zip |
Move libc replacement files from src/backend/port to src/port.
Diffstat (limited to 'src/backend/port/isinf.c')
-rw-r--r-- | src/backend/port/isinf.c | 82 |
1 files changed, 0 insertions, 82 deletions
diff --git a/src/backend/port/isinf.c b/src/backend/port/isinf.c deleted file mode 100644 index 96c42d20a95..00000000000 --- a/src/backend/port/isinf.c +++ /dev/null @@ -1,82 +0,0 @@ -/* $Id: isinf.c,v 1.18 2001/10/28 06:25:47 momjian Exp $ */ - -#include "c.h" - -#include <math.h> - -#if HAVE_FPCLASS /* this is _not_ HAVE_FP_CLASS, and not - * typo */ - -#if HAVE_IEEEFP_H -#include <ieeefp.h> -#endif -int -isinf(double d) -{ - fpclass_t type = fpclass(d); - - switch (type) - { - case FP_NINF: - case FP_PINF: - return 1; - default: - break; - } - 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; -{ -#if HAVE_FP_CLASS - int fpclass = fp_class(x); - -#else - int fpclass = fp_class_d(x); -#endif - - if (fpclass == FP_POS_INF) - return 1; - if (fpclass == FP_NEG_INF) - return -1; - return 0; -} - -#elif 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 -#endif - -#ifdef __QNX__ -#include <float.h> - -int -isinf(double x) -{ - if (x == HUGE_VAL) - return 1; - if (x == -HUGE_VAL) - return -1; - return 0; -} - -#endif |