diff options
| author | 2018-10-23 10:23:41 -0400 | |
|---|---|---|
| committer | 2018-10-23 10:23:41 -0400 | |
| commit | e7e209d9001967319fb4cba374ee9c750adf1fb6 (patch) | |
| tree | d3449345bf133db24c3545571331fb2a8eea07fa /src/common/file_util.cpp | |
| parent | Merge pull request #1519 from ReinUsesLisp/vsetp (diff) | |
| parent | cmake: mingw also needs _FILE_OFFSET_BITS=64 (diff) | |
| download | yuzu-e7e209d9001967319fb4cba374ee9c750adf1fb6.tar.gz yuzu-e7e209d9001967319fb4cba374ee9c750adf1fb6.tar.xz yuzu-e7e209d9001967319fb4cba374ee9c750adf1fb6.zip | |
Merge pull request #1552 from FearlessTobi/port-4336
Port citra-emu/citra#4336: "Only redefine some 64-bit file operation for MSVC"
Diffstat (limited to 'src/common/file_util.cpp')
| -rw-r--r-- | src/common/file_util.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
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 @@ | |||
| 15 | #ifdef _WIN32 | 15 | #ifdef _WIN32 |
| 16 | #include <windows.h> | 16 | #include <windows.h> |
| 17 | // windows.h needs to be included before other windows headers | 17 | // windows.h needs to be included before other windows headers |
| 18 | #include <commdlg.h> // for GetSaveFileName | 18 | #include <direct.h> // getcwd |
| 19 | #include <direct.h> // getcwd | ||
| 20 | #include <io.h> | 19 | #include <io.h> |
| 21 | #include <shellapi.h> | 20 | #include <shellapi.h> |
| 22 | #include <shlobj.h> // for SHGetFolderPath | 21 | #include <shlobj.h> // for SHGetFolderPath |
| 23 | #include <tchar.h> | 22 | #include <tchar.h> |
| 24 | #include "common/string_util.h" | 23 | #include "common/string_util.h" |
| 25 | 24 | ||
| 26 | // 64 bit offsets for windows | 25 | #ifdef _MSC_VER |
| 26 | // 64 bit offsets for MSVC | ||
| 27 | #define fseeko _fseeki64 | 27 | #define fseeko _fseeki64 |
| 28 | #define ftello _ftelli64 | 28 | #define ftello _ftelli64 |
| 29 | #define atoll _atoi64 | 29 | #define fileno _fileno |
| 30 | #endif | ||
| 31 | |||
| 32 | // 64 bit offsets for MSVC and MinGW. MinGW also needs this for using _wstat64 | ||
| 30 | #define stat _stat64 | 33 | #define stat _stat64 |
| 31 | #define fstat _fstat64 | 34 | #define fstat _fstat64 |
| 32 | #define fileno _fileno | 35 | |
| 33 | #else | 36 | #else |
| 34 | #ifdef __APPLE__ | 37 | #ifdef __APPLE__ |
| 35 | #include <sys/param.h> | 38 | #include <sys/param.h> |