aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2020-02-21 13:18:27 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2020-02-21 14:30:47 -0500
commit7fde892bc191e4df9fcd52ce11d1502673498d97 (patch)
treed708c07b1c64624c4eb98efd00a754e1a65443fa /src
parent799d22461a932aace890d61a82186e0d64de0ee8 (diff)
downloadpostgresql-7fde892bc191e4df9fcd52ce11d1502673498d97.tar.gz
postgresql-7fde892bc191e4df9fcd52ce11d1502673498d97.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/include/pg_config.h.in21
-rw-r--r--src/include/port.h4
-rw-r--r--src/port/isinf.c81
-rw-r--r--src/tools/msvc/Solution.pm7
4 files changed, 0 insertions, 113 deletions
diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in
index e7de8f3b2b4..002e0400083 100644
--- a/src/include/pg_config.h.in
+++ b/src/include/pg_config.h.in
@@ -104,9 +104,6 @@
/* Define to 1 if you have the `cbrt' function. */
#undef HAVE_CBRT
-/* Define to 1 if you have the `class' function. */
-#undef HAVE_CLASS
-
/* Define to 1 if you have the `clock_gettime' function. */
#undef HAVE_CLOCK_GETTIME
@@ -206,18 +203,6 @@
/* Define to 1 if you have the `fls' function. */
#undef HAVE_FLS
-/* Define to 1 if you have the `fpclass' function. */
-#undef HAVE_FPCLASS
-
-/* Define to 1 if you have the `fp_class' function. */
-#undef HAVE_FP_CLASS
-
-/* Define to 1 if you have the `fp_class_d' function. */
-#undef HAVE_FP_CLASS_D
-
-/* Define to 1 if you have the <fp_class.h> header file. */
-#undef HAVE_FP_CLASS_H
-
/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
#undef HAVE_FSEEKO
@@ -295,9 +280,6 @@
/* Define to 1 if you have the `history_truncate_file' function. */
#undef HAVE_HISTORY_TRUNCATE_FILE
-/* Define to 1 if you have the <ieeefp.h> header file. */
-#undef HAVE_IEEEFP_H
-
/* Define to 1 if you have the <ifaddrs.h> header file. */
#undef HAVE_IFADDRS_H
@@ -325,9 +307,6 @@
/* Define to 1 if you have support for IPv6. */
#undef HAVE_IPV6
-/* Define to 1 if you have isinf(). */
-#undef HAVE_ISINF
-
/* Define to 1 if __builtin_constant_p(x) implies "i"(x) acceptance. */
#undef HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P
diff --git a/src/include/port.h b/src/include/port.h
index 3f5f90fa007..e40452c1ed0 100644
--- a/src/include/port.h
+++ b/src/include/port.h
@@ -352,9 +352,6 @@ extern int getpeereid(int sock, uid_t *uid, gid_t *gid);
#endif
#endif
-#ifndef HAVE_ISINF
-extern int isinf(double x);
-#else
/*
* Glibc doesn't use the builtin for clang due to a *gcc* bug in a version
* newer than the gcc compatibility clang claims to have. This would cause a
@@ -370,7 +367,6 @@ extern int isinf(double x);
#define isinf __builtin_isinf
#endif /* __has_builtin(isinf) */
#endif /* __clang__ && !__cplusplus */
-#endif /* !HAVE_ISINF */
#ifndef HAVE_EXPLICIT_BZERO
extern void explicit_bzero(void *buf, size_t len);
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 <float.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(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
diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm
index d1a4f183f3e..8a703385ea2 100644
--- a/src/tools/msvc/Solution.pm
+++ b/src/tools/msvc/Solution.pm
@@ -211,7 +211,6 @@ sub GenerateFiles
HAVE_BIO_GET_DATA => undef,
HAVE_BIO_METH_NEW => undef,
HAVE_CBRT => undef,
- HAVE_CLASS => undef,
HAVE_CLOCK_GETTIME => undef,
HAVE_COMPUTED_GOTO => undef,
HAVE_COPYFILE => undef,
@@ -240,10 +239,6 @@ sub GenerateFiles
HAVE_EXPLICIT_BZERO => undef,
HAVE_FDATASYNC => undef,
HAVE_FLS => undef,
- HAVE_FPCLASS => undef,
- HAVE_FP_CLASS => undef,
- HAVE_FP_CLASS_D => undef,
- HAVE_FP_CLASS_H => undef,
HAVE_FSEEKO => 1,
HAVE_FUNCNAME__FUNC => undef,
HAVE_FUNCNAME__FUNCTION => 1,
@@ -269,7 +264,6 @@ sub GenerateFiles
HAVE_GSSAPI_H => undef,
HAVE_HISTORY_H => undef,
HAVE_HISTORY_TRUNCATE_FILE => undef,
- HAVE_IEEEFP_H => undef,
HAVE_IFADDRS_H => undef,
HAVE_INET_ATON => undef,
HAVE_INT_TIMEZONE => 1,
@@ -279,7 +273,6 @@ sub GenerateFiles
HAVE_INT_OPTERR => undef,
HAVE_INT_OPTRESET => undef,
HAVE_IPV6 => 1,
- HAVE_ISINF => 1,
HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P => undef,
HAVE_KQUEUE => undef,
HAVE_LANGINFO_H => undef,