| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
#ifndef __RARCH_MSVC_COMPAT_H |
| 17 |
#define __RARCH_MSVC_COMPAT_H |
| 18 |
|
| 19 |
#ifdef _MSC_VER |
| 20 |
|
| 21 |
#undef UNICODE // Do not bother with UNICODE at this time. |
| 22 |
#include <stddef.h> |
| 23 |
#include <io.h> |
| 24 |
#include <math.h> |
| 25 |
|
| 26 |
|
| 27 |
#ifndef HAVE_SSIZE_T |
| 28 |
#if defined(_WIN64) |
| 29 |
typedef __int64 ssize_t; |
| 30 |
#elif defined(_WIN32) |
| 31 |
typedef int ssize_t; |
| 32 |
#endif |
| 33 |
#endif |
| 34 |
|
| 35 |
#define snprintf _snprintf |
| 36 |
#define strtoll _strtoi64 |
| 37 |
#define strtoull _strtoui64 |
| 38 |
#define strcasecmp _stricmp |
| 39 |
#define strncasecmp _strnicmp |
| 40 |
#define strdup _strdup |
| 41 |
#define lseek _lseek |
| 42 |
|
| 43 |
#include <tchar.h> |
| 44 |
#define strlen _tcslen |
| 45 |
|
| 46 |
# define S_IRUSR S_IREAD |
| 47 |
# define S_IWUSR S_IWRITE |
| 48 |
|
| 49 |
|
| 50 |
#pragma warning(disable : 4800) |
| 51 |
#pragma warning(disable : 4244) |
| 52 |
#pragma warning(disable : 4305) |
| 53 |
#pragma warning(disable : 4146) |
| 54 |
#pragma warning(disable : 4267) |
| 55 |
|
| 56 |
#define roundf(in) (in >= 0.0f ? floorf(in + 0.5f) : ceilf(in - 0.5f)) |
| 57 |
|
| 58 |
#ifndef PATH_MAX |
| 59 |
#define PATH_MAX MAX_PATH |
| 60 |
#endif |
| 61 |
|
| 62 |
#endif |
| 63 |
#endif |
| 64 |
|