summaryrefslogtreecommitdiffstats
path: root/Modules/mathmodule.c
diff options
context:
space:
mode:
authorLouie Lu <me@louie.lu>2017-03-30 17:05:10 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2017-03-30 17:05:10 (GMT)
commit7a26464c6496c29244072fdd80f9b92c68174742 (patch)
treeaaf901790c73cfc5f9e55361eb6ce9d88a12f54c /Modules/mathmodule.c
parent5466d4af5fe76ec0a5fbc8a05675287d9e8e9d14 (diff)
downloadcpython-7a26464c6496c29244072fdd80f9b92c68174742.zip
cpython-7a26464c6496c29244072fdd80f9b92c68174742.tar.gz
cpython-7a26464c6496c29244072fdd80f9b92c68174742.tar.bz2
bpo-29946: Fix "sqrtpi defined but not used" (#908)
Diffstat (limited to 'Modules/mathmodule.c')
-rw-r--r--Modules/mathmodule.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c
index d5a8ca1..243560a 100644
--- a/Modules/mathmodule.c
+++ b/Modules/mathmodule.c
@@ -71,8 +71,10 @@ module math
*/
static const double pi = 3.141592653589793238462643383279502884197;
-static const double sqrtpi = 1.772453850905516027298167483341145182798;
static const double logpi = 1.144729885849400174143427351353058711647;
+#if !defined(HAVE_ERF) || !defined(HAVE_ERFC)
+static const double sqrtpi = 1.772453850905516027298167483341145182798;
+#endif /* !defined(HAVE_ERF) || !defined(HAVE_ERFC) */
static double
sinpi(double x)