From c6a8dafe0925891a8485527cf137206c25cc24da Mon Sep 17 00:00:00 2001 From: dankan1890 Date: Fri, 30 Oct 2015 00:53:40 +0100 Subject: [PATCH 1/2] Fix for VS2013 build. --- src/osd/osdcomm.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/osd/osdcomm.h b/src/osd/osdcomm.h index 4ec625878ab..8a2beff3463 100644 --- a/src/osd/osdcomm.h +++ b/src/osd/osdcomm.h @@ -226,12 +226,13 @@ typedef UINT32 FPTR; #ifdef _MSC_VER #include 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 From b51e3df52525a40ea8347248cab25841e01edc30 Mon Sep 17 00:00:00 2001 From: dankan1890 Date: Fri, 30 Oct 2015 01:02:09 +0100 Subject: [PATCH 2/2] Fixed comment. --- src/osd/osdcomm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osd/osdcomm.h b/src/osd/osdcomm.h index 8a2beff3463..3a16220ae77 100644 --- a/src/osd/osdcomm.h +++ b/src/osd/osdcomm.h @@ -242,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 or earlier -#else // #ifndef _MSC_VER +#endif // VS2012 or earlier +#else // VS2015 #define _CRT_STDIO_LEGACY_WIDE_SPECIFIERS #endif #endif