]> granicus.if.org Git - python/commitdiff
bpo-29946: Fix "sqrtpi defined but not used" (#908)
authorLouie Lu <me@louie.lu>
Thu, 30 Mar 2017 17:05:10 +0000 (01:05 +0800)
committerSerhiy Storchaka <storchaka@gmail.com>
Thu, 30 Mar 2017 17:05:10 +0000 (20:05 +0300)
Modules/mathmodule.c

index d5a8ca1ebefdc1a0fa824aa435eb183bdc7da7e8..243560a4d8bc43d69ee13a1e007455ee456ce9da 100644 (file)
@@ -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)