diff --git a/src/lib_json/json_writer.cpp b/src/lib_json/json_writer.cpp index c7f72ee..83102fd 100644 --- a/src/lib_json/json_writer.cpp +++ b/src/lib_json/json_writer.cpp @@ -12,15 +12,25 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include -#if defined(_MSC_VER) && _MSC_VER < 1500 // VC++ 8.0 and below +#if defined(_MSC_VER) && _MSC_VER >= 1200 && _MSC_VER < 1800 // Between VC++ 6.0 and VC++ 11.0 #include #define isfinite _finite +#elif defined(__sun) && defined(__SVR4) //Solaris +#include +#define isfinite finite +#else +#include +#define isfinite std::isfinite +#endif + +#if defined(_MSC_VER) && _MSC_VER < 1500 // VC++ 8.0 and below #define snprintf _snprintf +#else +#define snprintf std::snprintf #endif #if defined(_MSC_VER) && _MSC_VER >= 1400 // VC++ 8.0 @@ -28,11 +38,6 @@ #pragma warning(disable : 4996) #endif -#if defined(__sun) && defined(__SVR4) //Solaris -#include -#define isfinite finite -#endif - namespace Json { #if __cplusplus >= 201103L