diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp index 75ea5f2..52bca03 100644 --- a/src/common/file_util.cpp +++ b/src/common/file_util.cpp @@ -21,18 +21,6 @@ #include // for SHGetFolderPath #include #include "common/string_util.h" - -#ifdef _MSC_VER -// 64 bit offsets for MSVC -#define fseeko _fseeki64 -#define ftello _ftelli64 -#define fileno _fileno -#endif - -// 64 bit offsets for MSVC and MinGW. MinGW also needs this for using _wstat64 -#define stat _stat64 -#define fstat _fstat64 - #else #ifdef __APPLE__ #include @@ -66,6 +54,19 @@ #include #include +#ifdef _WIN32 +#ifdef _MSC_VER +// 64 bit offsets for MSVC +#define fseeko _fseeki64 +#define ftello _ftelli64 +#define fileno _fileno +#endif + +// 64 bit offsets for MSVC and MinGW. MinGW also needs this for using _wstat64 +#define stat _stat64 +#define fstat _fstat64 +#endif + #ifndef S_ISDIR #define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR) #endif