Avoid using win32 lrintf ASM on mingw even when config.h is broken.
authorGregory Maxwell <greg@xiph.org>
Sat, 7 Jul 2012 05:53:06 +0000 (01:53 -0400)
committerGregory Maxwell <greg@xiph.org>
Sat, 7 Jul 2012 06:01:44 +0000 (02:01 -0400)
celt/float_cast.h

index 9095bb6..36a13fc 100644 (file)
 #include <math.h>
 #define float2int(x) lrint(x)
 
 #include <math.h>
 #define float2int(x) lrint(x)
 
-#elif (defined (WIN64) || defined (_WIN64))
+#elif (_MSC_VER >= 1400) && (defined (WIN64) || defined (_WIN64))
         #include <xmmintrin.h>
 
         __inline long int float2int(float value)
         {
                 return _mm_cvtss_si32(_mm_load_ss(&value));
         }
         #include <xmmintrin.h>
 
         __inline long int float2int(float value)
         {
                 return _mm_cvtss_si32(_mm_load_ss(&value));
         }
-#elif (defined (WIN32) || defined (_WIN32))
+#elif (_MSC_VER >= 1400) && (defined (WIN32) || defined (_WIN32))
         #include <math.h>
 
         /*      Win32 doesn't seem to have these functions.
         #include <math.h>
 
         /*      Win32 doesn't seem to have these functions.