Fix for VS2013 build.

This commit is contained in:
dankan1890 2015-10-30 00:53:40 +01:00
parent 433b7efc19
commit c6a8dafe09

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,8 +242,8 @@ 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
#else // VS2015
#endif // VS2013 or earlier
#else // #ifndef _MSC_VER
#define _CRT_STDIO_LEGACY_WIDE_SPECIFIERS
#endif
#endif