vs2015 fixes

This commit is contained in:
zeromus 2016-03-21 01:33:13 +00:00
parent a0ea0b258d
commit 708a2cfef5
2 changed files with 9 additions and 2 deletions

View File

@ -86,7 +86,9 @@ typedef int ssize_t;
#pragma warning(disable : 4723) #pragma warning(disable : 4723)
#pragma warning(disable : 4996) #pragma warning(disable : 4996)
#if _MSC_VER < 1200
#define roundf(in) (in >= 0.0f ? floorf(in + 0.5f) : ceilf(in - 0.5f)) #define roundf(in) (in >= 0.0f ? floorf(in + 0.5f) : ceilf(in - 0.5f))
#endif
#ifndef PATH_MAX #ifndef PATH_MAX
#define PATH_MAX _MAX_PATH #define PATH_MAX _MAX_PATH

View File

@ -41,15 +41,20 @@ char *strtok_r(char *str, const char *delim, char **saveptr);
#ifdef _MSC_VER #ifdef _MSC_VER
#undef strcasecmp #undef strcasecmp
#undef strdup #undef strdup
#undef isblank
#define strcasecmp(a, b) retro_strcasecmp__(a, b) #define strcasecmp(a, b) retro_strcasecmp__(a, b)
#define strdup(orig) retro_strdup__(orig) #define strdup(orig) retro_strdup__(orig)
#define isblank(c) retro_isblank__(c)
int strcasecmp(const char *a, const char *b); int strcasecmp(const char *a, const char *b);
char *strdup(const char *orig); char *strdup(const char *orig);
#if _MSC_VER < 1200
#undef isblank
#define isblank(c) retro_isblank__(c)
int isblank(int c); int isblank(int c);
#endif #endif
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif