Workaround for missing C99 functions in older versions of Visual Studio

This commit is contained in:
Chuck Atkins 2014-09-19 13:16:09 -04:00
parent 4002f8a4be
commit 9dc9026e0b
2 changed files with 10 additions and 0 deletions

View File

@ -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)

View File

@ -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)