MSVC and Windows SDK compatibility

This commit is contained in:
David Hrdlička
2020-04-04 12:45:47 +02:00
parent 8bcacb1a59
commit 9acb489a1d
20 changed files with 68 additions and 37 deletions

View File

@@ -29,6 +29,7 @@
/* The Win32 API uses _wcsicmp. */
#ifdef _WIN32
# define wcscasecmp _wcsicmp
# define strcasecmp _stricmp
#endif
#if defined(UNIX) && defined(FREEBSD)
@@ -37,11 +38,20 @@
# define fseeko64 fseeko
# define ftello64 ftello
# define off64_t off_t
#elif defined(_MSC_VER)
//# define fopen64 fopen
# define fseeko64 _fseeki64
# define ftello64 _ftelli64
# define off64_t off_t
#endif
/* A hack (GCC-specific?) to allow us to ignore unused parameters. */
#define UNUSED(arg) __attribute__((unused))arg
#ifdef _MSC_VER
# define UNUSED(arg) arg
#else
/* A hack (GCC-specific?) to allow us to ignore unused parameters. */
# define UNUSED(arg) __attribute__((unused))arg
#endif
/* Return the size (in wchar's) of a wchar_t array. */
#define sizeof_w(x) (sizeof((x)) / sizeof(wchar_t))