From 7020451b448598811fd5bb5a5f8dd62b0e7c738e Mon Sep 17 00:00:00 2001 From: Dani-Hub Date: Tue, 10 Mar 2015 18:50:16 -0500 Subject: [PATCH] Fix isfinite for MSVC. --- src/lib_json/json_writer.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib_json/json_writer.cpp b/src/lib_json/json_writer.cpp index dc76032..de13f1b 100644 --- a/src/lib_json/json_writer.cpp +++ b/src/lib_json/json_writer.cpp @@ -16,7 +16,7 @@ #include #include -#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 #define isfinite _finite #define snprintf _snprintf @@ -28,6 +28,11 @@ #define isfinite std::isfinite #endif +#if defined(_MSC_VER) && _MSC_VER < 1500 // VC++ 8.0 and below +#include +#define snprintf _snprintf +#endif + #if defined(_MSC_VER) && _MSC_VER >= 1400 // VC++ 8.0 // Disable warning about strdup being deprecated. #pragma warning(disable : 4996)