summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-10-23 16:23:41 +0200
committerGitHub <noreply@github.com>2018-10-23 16:23:41 +0200
commite7e209d9001967319fb4cba374ee9c750adf1fb6 (patch)
treed3449345bf133db24c3545571331fb2a8eea07fa
parentMerge pull request #1519 from ReinUsesLisp/vsetp (diff)
parentcmake: mingw also needs _FILE_OFFSET_BITS=64 (diff)
downloadyuzu-e7e209d9001967319fb4cba374ee9c750adf1fb6.tar
yuzu-e7e209d9001967319fb4cba374ee9c750adf1fb6.tar.gz
yuzu-e7e209d9001967319fb4cba374ee9c750adf1fb6.tar.bz2
yuzu-e7e209d9001967319fb4cba374ee9c750adf1fb6.tar.lz
yuzu-e7e209d9001967319fb4cba374ee9c750adf1fb6.tar.xz
yuzu-e7e209d9001967319fb4cba374ee9c750adf1fb6.tar.zst
yuzu-e7e209d9001967319fb4cba374ee9c750adf1fb6.zip
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/common/file_util.cpp13
2 files changed, 9 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6021a8054..6e98b557e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -170,7 +170,7 @@ endif()
# On modern Unixes, this is typically already the case. The lone exception is
# glibc, which may default to 32 bits. glibc allows this to be configured
# by setting _FILE_OFFSET_BITS.
-if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR MINGW)
add_definitions(-D_FILE_OFFSET_BITS=64)
endif()
diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp
index 548463787..b52492da6 100644
--- a/src/common/file_util.cpp
+++ b/src/common/file_util.cpp
@@ -15,21 +15,24 @@
#ifdef _WIN32
#include <windows.h>
// windows.h needs to be included before other windows headers
-#include <commdlg.h> // for GetSaveFileName
-#include <direct.h> // getcwd
+#include <direct.h> // getcwd
#include <io.h>
#include <shellapi.h>
#include <shlobj.h> // for SHGetFolderPath
#include <tchar.h>
#include "common/string_util.h"
-// 64 bit offsets for windows
+#ifdef _MSC_VER
+// 64 bit offsets for MSVC
#define fseeko _fseeki64
#define ftello _ftelli64
-#define atoll _atoi64
+#define fileno _fileno
+#endif
+
+// 64 bit offsets for MSVC and MinGW. MinGW also needs this for using _wstat64
#define stat _stat64
#define fstat _fstat64
-#define fileno _fileno
+
#else
#ifdef __APPLE__
#include <sys/param.h>