| 1 | #ifndef COMPAT_MSVC_POSIX_H |
| 2 | #define COMPAT_MSVC_POSIX_H |
| 3 | |
| 4 | #include <direct.h> |
| 5 | #include <process.h> |
| 6 | #include <malloc.h> |
| 7 | #include <io.h> |
| 8 | |
| 9 | #pragma warning(disable: 4018) /* signed/unsigned comparison */ |
| 10 | #pragma warning(disable: 4244) /* type conversion, possible loss of data */ |
| 11 | #pragma warning(disable: 4090) /* 'function' : different 'const' qualifiers (ALLOC_GROW etc.)*/ |
| 12 | |
| 13 | /* porting function */ |
| 14 | #define inline __inline |
| 15 | #define __inline__ __inline |
| 16 | #define __attribute__(x) |
| 17 | #define strcasecmp _stricmp |
| 18 | #define strncasecmp _strnicmp |
| 19 | #define ftruncate _chsize |
| 20 | #define strtoull _strtoui64 |
| 21 | #define strtoll _strtoi64 |
| 22 | |
| 23 | #undef ERROR |
| 24 | |
| 25 | #define ftello _ftelli64 |
| 26 | |
| 27 | typedef int sigset_t; |
| 28 | /* open for reading, writing, or both (not in fcntl.h) */ |
| 29 | #define O_ACCMODE (_O_RDONLY | _O_WRONLY | _O_RDWR) |
| 30 | |
| 31 | #include "mingw-posix.h" |
| 32 | |
| 33 | #endif /* COMPAT_MSVC_POSIX_H */ |