MSVS : Define _USE_MATH_DEFINES.
authorErik de Castro Lopo <erikd@mega-nerd.com>
Sat, 7 Sep 2013 09:13:43 +0000 (19:13 +1000)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Sat, 7 Sep 2013 12:00:23 +0000 (22:00 +1000)
MSVS does defined the M_LN2 constant in <math.h> but only makes it
visible if _USE_MATH_DEFINES is defined.

Patch-from: lvqcl <lvqcl.mail@gmail.com>

src/libFLAC/fixed.c
src/libFLAC/libFLAC_dynamic.vcproj
src/libFLAC/libFLAC_static.vcproj
src/libFLAC/lpc.c

index 8c96cc0..16b542d 100644 (file)
@@ -42,7 +42,6 @@
 #include "FLAC/assert.h"
 
 #ifndef M_LN2
-/* math.h in VC++ doesn't seem to have this (how Microsoft is that?) */
 #define M_LN2 0.69314718055994530942
 #endif
 
index ba689ab..0abb717 100644 (file)
@@ -38,6 +38,7 @@
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
+                               AdditionalOptions="/D &quot;_USE_MATH_DEFINES&quot;"\r
                                Optimization="0"\r
                                AdditionalIncludeDirectories=".\include;..\..\include"\r
                                PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FLAC_API_EXPORTS;FLAC__HAS_OGG;FLAC__CPU_IA32;FLAC__HAS_NASM;FLAC__USE_3DNOW;FLAC__ALIGN_MALLOC_DATA;VERSION=\&quot;1.3.0\&quot;;DEBUG;FLAC__OVERFLOW_DETECT"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
+                               AdditionalOptions="/D &quot;_USE_MATH_DEFINES&quot;"\r
                                EnableIntrinsicFunctions="true"\r
                                FavorSizeOrSpeed="1"\r
                                OmitFramePointers="true"\r
index 1ace70c..de48c50 100644 (file)
@@ -38,6 +38,7 @@
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
+                               AdditionalOptions="/D &quot;_USE_MATH_DEFINES&quot;"\r
                                Optimization="0"\r
                                AdditionalIncludeDirectories=".\include;..\..\include"\r
                                PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLAC__HAS_OGG;FLAC__CPU_IA32;FLAC__HAS_NASM;FLAC__USE_3DNOW;FLAC__ALIGN_MALLOC_DATA;VERSION=\&quot;1.3.0\&quot;;FLAC__NO_DLL;DEBUG;FLAC__OVERFLOW_DETECT"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
+                               AdditionalOptions="/D &quot;_USE_MATH_DEFINES&quot;"\r
                                EnableIntrinsicFunctions="true"\r
                                FavorSizeOrSpeed="1"\r
                                OmitFramePointers="true"\r
index 3dee02e..476368a 100644 (file)
@@ -52,7 +52,6 @@
 #ifndef FLAC__INTEGER_ONLY_LIBRARY
 
 #ifndef M_LN2
-/* math.h in VC++ doesn't seem to have this (how Microsoft is that?) */
 #define M_LN2 0.69314718055994530942
 #endif