Fix some MSVC fails.

This commit is contained in:
Alcaro 2015-09-06 15:36:03 +02:00
parent 3067cfa602
commit 5f1729dbac
3 changed files with 15 additions and 3 deletions

View File

@ -21,6 +21,7 @@
*/
#include <string.h>
#include <stdio.h>
#include <dynamic/dylib.h>
#ifdef NEED_DYNAMIC

View File

@ -1,6 +1,7 @@
#include <retro_dirent.h>
#include <stdlib.h>
#include <stdio.h>
#if defined(_WIN32)
# include <compat/posix_string.h>

View File

@ -23,7 +23,7 @@
#ifndef __LIBRETRO_SDK_COMPAT_POSIX_STRING_H
#define __LIBRETRO_SDK_COMPAT_POSIX_STRING_H
#ifdef _WIN32
#ifdef _MSC_VER
#include <compat/msvc.h>
@ -31,8 +31,18 @@
extern "C" {
#endif
#include <stdio.h>
#define snprintf _snprintf
#undef strcasecmp
#undef strdup
#undef isblank
#undef strtok_r
#define strcasecmp(a, b) rarch_strcasecmp__(a, b)
#define strdup(orig) rarch_strdup__(orig)
#define isblank(c) rarch_isblank__(c)
#define strtok_r(str, delim, saveptr) rarch_strtok_r__(str, delim, saveptr)
int strcasecmp(const char *a, const char *b);
char *strdup(const char *orig);
int isblank(int c);
char *strtok_r(char *str, const char *delim, char **saveptr);
#ifdef __cplusplus
}