mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-02-25 07:41:07 +01:00
Merge pull request #46 from chuckatkins/fix-for-old-msvc
Workaround for missing C99 functions in older versions of Visual Studio
This commit is contained in:
commit
8aec8d88f2
@ -15,6 +15,10 @@
|
||||
#include <cstring>
|
||||
#include <istream>
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1500 // VC++ 8.0 and below
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1400 // VC++ 8.0
|
||||
// Disable warning about strdup being deprecated.
|
||||
#pragma warning(disable : 4996)
|
||||
|
@ -15,6 +15,12 @@
|
||||
#include <iomanip>
|
||||
#include <math.h>
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1500 // VC++ 8.0 and below
|
||||
#include <float.h>
|
||||
#define isfinite _finite
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1400 // VC++ 8.0
|
||||
// Disable warning about strdup being deprecated.
|
||||
#pragma warning(disable : 4996)
|
||||
|
Loading…
x
Reference in New Issue
Block a user