From f328f862302c40771b6bc7d9febd43232771a083 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 8 Sep 2010 00:38:49 +0200 Subject: [PATCH] Clarify feature macro conditionals. * libguile/numbers.c (scm_log10): Check whether `HAVE_COMPLEX_DOUBLE' and `HAVE_CLOG10' are defined instead of checking whether they are non-zero. (scm_sqrt): Likewise for `HAVE_COMPLEX_DOUBLE' and `HAVE_USABLE_CSQRT'. --- libguile/numbers.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libguile/numbers.c b/libguile/numbers.c index ddfa41a85..840b100d3 100644 --- a/libguile/numbers.c +++ b/libguile/numbers.c @@ -6440,7 +6440,8 @@ SCM_DEFINE (scm_log10, "log10", 1, 0, 0, /* Mingw has clog() but not clog10(). (Maybe it'd be worth using clog() and a multiply by M_LOG10E, rather than the fallback log10+hypot+atan2.) */ -#if HAVE_COMPLEX_DOUBLE && HAVE_CLOG10 && defined (SCM_COMPLEX_VALUE) +#if defined HAVE_COMPLEX_DOUBLE && defined HAVE_CLOG10 \ + && defined SCM_COMPLEX_VALUE return scm_from_complex_double (clog10 (SCM_COMPLEX_VALUE (z))); #else double re = SCM_COMPLEX_REAL (z); @@ -6506,7 +6507,8 @@ SCM_DEFINE (scm_sqrt, "sqrt", 1, 0, 0, { if (SCM_COMPLEXP (x)) { -#if HAVE_COMPLEX_DOUBLE && HAVE_USABLE_CSQRT && defined (SCM_COMPLEX_VALUE) +#if defined HAVE_COMPLEX_DOUBLE && defined HAVE_USABLE_CSQRT \ + && defined SCM_COMPLEX_VALUE return scm_from_complex_double (csqrt (SCM_COMPLEX_VALUE (x))); #else double re = SCM_COMPLEX_REAL (x);