From 708a2cfef5854f72a7df20aa1b48fb103156bdde Mon Sep 17 00:00:00 2001 From: zeromus Date: Mon, 21 Mar 2016 01:33:13 +0000 Subject: [PATCH] vs2015 fixes --- desmume/src/libretro-common/include/compat/msvc.h | 2 ++ .../src/libretro-common/include/compat/posix_string.h | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/desmume/src/libretro-common/include/compat/msvc.h b/desmume/src/libretro-common/include/compat/msvc.h index 35c81ead5..f2f11b939 100644 --- a/desmume/src/libretro-common/include/compat/msvc.h +++ b/desmume/src/libretro-common/include/compat/msvc.h @@ -86,7 +86,9 @@ typedef int ssize_t; #pragma warning(disable : 4723) #pragma warning(disable : 4996) +#if _MSC_VER < 1200 #define roundf(in) (in >= 0.0f ? floorf(in + 0.5f) : ceilf(in - 0.5f)) +#endif #ifndef PATH_MAX #define PATH_MAX _MAX_PATH diff --git a/desmume/src/libretro-common/include/compat/posix_string.h b/desmume/src/libretro-common/include/compat/posix_string.h index bd18f61aa..17eed5436 100644 --- a/desmume/src/libretro-common/include/compat/posix_string.h +++ b/desmume/src/libretro-common/include/compat/posix_string.h @@ -41,15 +41,20 @@ char *strtok_r(char *str, const char *delim, char **saveptr); #ifdef _MSC_VER #undef strcasecmp #undef strdup -#undef isblank #define strcasecmp(a, b) retro_strcasecmp__(a, b) #define strdup(orig) retro_strdup__(orig) -#define isblank(c) retro_isblank__(c) int strcasecmp(const char *a, const char *b); char *strdup(const char *orig); + +#if _MSC_VER < 1200 +#undef isblank +#define isblank(c) retro_isblank__(c) int isblank(int c); #endif +#endif + + #ifdef __cplusplus } #endif