From c04eb7be9dd17ffc5dfbc9e2b31687f0a1b54ab1 Mon Sep 17 00:00:00 2001 From: James Zern Date: Thu, 3 May 2012 16:59:13 -0700 Subject: [PATCH] tcoder.c: define NOT_HAVE_LOG2 for MSVC builds no version of msvc currently implements log2(). unconditionally define NOT_HAVE_LOG2 in this case to simplify building libwebp sources in other projects. Change-Id: Ia9d985b1125553c5a8271d7e539bc1b4f898d749 --- src/utils/tcoder.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/utils/tcoder.c b/src/utils/tcoder.c index e319443a..035fa1f9 100644 --- a/src/utils/tcoder.c +++ b/src/utils/tcoder.c @@ -88,6 +88,10 @@ extern "C" { #endif +#if defined(_MSC_VER) && !defined(NOT_HAVE_LOG2) +# define NOT_HAVE_LOG2 1 +#endif + #ifdef NOT_HAVE_LOG2 static double log2(double d) { const double kLog2Reciprocal = 1.442695040888963;