mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-25 09:20:18 +00:00
Update file_util.cpp
Use mingw32 macro definition "defined(MINGW_HAS_SECURE_API)" support "_s" functions,and "!defined(MINGW_HAS_SECURE_API)" disable "_s" functions supported
This commit is contained in:
parent
de4059eef0
commit
4f09c3f915
@ -928,7 +928,7 @@ bool IOFile::Open(const std::string& filename, const char openmode[])
|
||||
{
|
||||
Close();
|
||||
#ifdef _WIN32
|
||||
#if defined(__MINGW64__)
|
||||
#if defined(__MINGW64__) && !defined(MINGW_HAS_SECURE_API)
|
||||
m_file = _wfsopen(Common::UTF8ToUTF16W(filename).c_str(), Common::UTF8ToUTF16W(openmode).c_str(), SH_DENYNO);
|
||||
#else
|
||||
_wfopen_s(&m_file, Common::UTF8ToUTF16W(filename).c_str(), Common::UTF8ToUTF16W(openmode).c_str());
|
||||
@ -987,7 +987,7 @@ bool IOFile::Resize(u64 size)
|
||||
if (!IsOpen() || 0 !=
|
||||
|
||||
#ifdef _WIN32
|
||||
#if defined(__MINGW64__)
|
||||
#if defined(__MINGW64__) && !defined(MINGW_HAS_SECURE_API)
|
||||
//TDM-GCC64 does not supports _chsize_s ?in <io_s.h>
|
||||
_chsize(_fileno(m_file), size)
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user