mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-18 08:32:30 +01:00
Switch to ANSI Windows API in fsbridge::fopen() function
This commit is contained in:
@@ -12,7 +12,6 @@
|
||||
#include <sys/utsname.h>
|
||||
#include <unistd.h>
|
||||
#else
|
||||
#include <codecvt>
|
||||
#include <limits>
|
||||
#include <windows.h>
|
||||
#endif
|
||||
@@ -28,8 +27,7 @@ FILE *fopen(const fs::path& p, const char *mode)
|
||||
#ifndef WIN32
|
||||
return ::fopen(p.c_str(), mode);
|
||||
#else
|
||||
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>,wchar_t> utf8_cvt;
|
||||
return ::_wfopen(p.wstring().c_str(), utf8_cvt.from_bytes(mode).c_str());
|
||||
return ::fopen(p.utf8string().c_str(), mode);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user