Fix isfinite for MSVC.

This commit is contained in:
Dani-Hub 2015-03-10 18:50:16 -05:00 committed by Christopher Dunn
parent 80497f102e
commit 7020451b44

View File

@ -16,7 +16,7 @@
#include <cstring> #include <cstring>
#include <cstdio> #include <cstdio>
#if defined(_MSC_VER) && _MSC_VER < 1500 // VC++ 8.0 and below #if defined(_MSC_VER) && _MSC_VER >= 1200 // VC++ 6.0 and above
#include <float.h> #include <float.h>
#define isfinite _finite #define isfinite _finite
#define snprintf _snprintf #define snprintf _snprintf
@ -28,6 +28,11 @@
#define isfinite std::isfinite #define isfinite std::isfinite
#endif #endif
#if defined(_MSC_VER) && _MSC_VER < 1500 // VC++ 8.0 and below
#include <float.h>
#define snprintf _snprintf
#endif
#if defined(_MSC_VER) && _MSC_VER >= 1400 // VC++ 8.0 #if defined(_MSC_VER) && _MSC_VER >= 1400 // VC++ 8.0
// Disable warning about strdup being deprecated. // Disable warning about strdup being deprecated.
#pragma warning(disable : 4996) #pragma warning(disable : 4996)