From 7fde892bc191e4df9fcd52ce11d1502673498d97 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 21 Feb 2020 13:18:27 -0500 Subject: Assume that we have isinf(). Windows has this, and so do all other live platforms according to the buildfarm, so remove the configure probe and src/port/ substitution. This also lets us get rid of some configure probes that existed only to support src/port/isinf.c. I kept the port.h hack to force using __builtin_isinf() on clang, though. This is part of a series of commits to get rid of no-longer-relevant configure checks and dead src/port/ code. I'm committing them separately to make it easier to back out individual changes if they prove less portable than I expect. Discussion: https://postgr.es/m/15379.1582221614@sss.pgh.pa.us --- src/port/isinf.c | 81 -------------------------------------------------------- 1 file changed, 81 deletions(-) delete mode 100644 src/port/isinf.c (limited to 'src/port/isinf.c') diff --git a/src/port/isinf.c b/src/port/isinf.c deleted file mode 100644 index 9bb40bc704a..00000000000 --- a/src/port/isinf.c +++ /dev/null @@ -1,81 +0,0 @@ -/*------------------------------------------------------------------------- - * - * isinf.c - * - * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group - * Portions Copyright (c) 1994, Regents of the University of California - * - * - * IDENTIFICATION - * src/port/isinf.c - * - *------------------------------------------------------------------------- - */ - -#include "c.h" - -#include -#include - -#if HAVE_FPCLASS /* this is _not_ HAVE_FP_CLASS, and not typo */ - -#if HAVE_IEEEFP_H -#include -#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 -#endif - -int -isinf(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 -- cgit v1.2.3