Merge pull request #445 from dankan1890/master

Fix for VS2013 build.
This commit is contained in:
Vas Crabb 2015-10-31 22:09:04 +11:00
commit 8bb4b1b795

View File

@ -226,12 +226,13 @@ typedef UINT32 FPTR;
#ifdef _MSC_VER
#include <malloc.h>
typedef ptrdiff_t ssize_t;
#if _MSC_VER == 1900 // < VS2015
#if _MSC_VER == 1900 // VS2015
#define __LINE__Var 0
#endif
#if _MSC_VER < 1900 // < VS2015
#endif // VS2015
#if _MSC_VER < 1900 // VS2013 or earlier
#define snprintf _snprintf
#if _MSC_VER < 1800 // VS2013 or earlier
#define __func__ __FUNCTION__
#if _MSC_VER < 1800 // VS2012 or earlier
#define alloca _alloca
#define round(x) floor((x) + 0.5)
#define strtoll _strtoi64
@ -241,7 +242,7 @@ static __inline double fmin(double x, double y){ return (x < y) ? x : y; }
static __inline double fmax(double x, double y){ return (x > y) ? x : y; }
static __inline double log2(double x) { return log(x) * M_LOG2E; }
#define __func__ __FUNCTION__
#endif // VS2013
#endif // VS2012 or earlier
#else // VS2015
#define _CRT_STDIO_LEGACY_WIDE_SPECIFIERS
#endif