From ce6832bb626ea5a281dd70309970e60aeb14fa4e Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo Date: Sat, 7 Sep 2013 19:19:36 +1000 Subject: [PATCH] Move defintion of M_LN2 to include/share/compat.h. --- include/share/compat.h | 3 +++ src/libFLAC/fixed.c | 5 +---- src/libFLAC/lpc.c | 4 ---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/include/share/compat.h b/include/share/compat.h index 022dc45b..6218b59b 100644 --- a/include/share/compat.h +++ b/include/share/compat.h @@ -174,6 +174,9 @@ #define flac_fstat fstat #endif +#ifndef M_LN2 +#define M_LN2 0.69314718055994530942 +#endif /* FLAC needs to compile and work correctly on systems with a norrmal ISO C99 * snprintf as well as Microsoft Visual Studio which has an non-standards diff --git a/src/libFLAC/fixed.c b/src/libFLAC/fixed.c index 16b542d6..0995226c 100644 --- a/src/libFLAC/fixed.c +++ b/src/libFLAC/fixed.c @@ -36,15 +36,12 @@ #include #include +#include "share/compat.h" #include "private/bitmath.h" #include "private/fixed.h" #include "private/macros.h" #include "FLAC/assert.h" -#ifndef M_LN2 -#define M_LN2 0.69314718055994530942 -#endif - #ifdef local_abs #undef local_abs #endif diff --git a/src/libFLAC/lpc.c b/src/libFLAC/lpc.c index 476368ae..0fa54f89 100644 --- a/src/libFLAC/lpc.c +++ b/src/libFLAC/lpc.c @@ -51,10 +51,6 @@ #ifndef FLAC__INTEGER_ONLY_LIBRARY -#ifndef M_LN2 -#define M_LN2 0.69314718055994530942 -#endif - #if !defined(HAVE_LROUND) #if defined(_MSC_VER) #include