summaryrefslogtreecommitdiffstats
path: root/Include/internal/pycore_pymath.h
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2021-10-13 21:27:50 (GMT)
committerGitHub <noreply@github.com>2021-10-13 21:27:50 (GMT)
commit194a9526d8ee6abbbe58ef48520ec87a7e83f327 (patch)
treeff8b22ba8a475d7da5a5b5a6ca75316bd9d44c5d /Include/internal/pycore_pymath.h
parentaac29af6785712019d34f1a7f15b3c408a4f68ae (diff)
downloadcpython-194a9526d8ee6abbbe58ef48520ec87a7e83f327.zip
cpython-194a9526d8ee6abbbe58ef48520ec87a7e83f327.tar.gz
cpython-194a9526d8ee6abbbe58ef48520ec87a7e83f327.tar.bz2
bpo-45440: Require math.h isinf() to build (GH-28894)
Building Python now requires a C99 <math.h> header file providing isinf(), isnan() and isfinite() functions. Remove the Py_FORCE_DOUBLE() macro. It was used by the Py_IS_INFINITY() macro. Changes: * Remove Py_IS_NAN(), Py_IS_INFINITY() and Py_IS_FINITE() in PC/pyconfig.h. * Remove the _Py_force_double() function. * configure no longer checks if math.h defines isinf(), isnan() and isfinite().
Diffstat (limited to 'Include/internal/pycore_pymath.h')
-rw-r--r--Include/internal/pycore_pymath.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Include/internal/pycore_pymath.h b/Include/internal/pycore_pymath.h
index 38f76d0..32743fc 100644
--- a/Include/internal/pycore_pymath.h
+++ b/Include/internal/pycore_pymath.h
@@ -142,6 +142,9 @@ extern void _Py_set_387controlword(unsigned short);
// Get and set x87 control word for VisualStudio/x86.
// x87 is not supported in 64-bit or ARM.
#if defined(_MSC_VER) && !defined(_WIN64) && !defined(_M_ARM)
+
+#include <float.h> // __control87_2()
+
#define _Py_SET_53BIT_PRECISION_HEADER \
unsigned int old_387controlword, new_387controlword, out_387controlword
// We use the __control87_2 function to set only the x87 control word.