mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-02 14:37:42 -03:00
test: Drop x
modifier in fsbridge::fopen
call for mingw builds
The MinGW-w64 toolchain links executables to the old msvcrt C Runtime
Library that does not support the `x` modifier for the _wfopen()
function.
Github-Pull: #29357
Rebased-From: d2fe90571e
This commit is contained in:
parent
a718bfafe7
commit
4ac0eb543d
1 changed files with 8 additions and 1 deletions
|
@ -29,7 +29,14 @@ BOOST_AUTO_TEST_CASE(xor_file)
|
||||||
BOOST_CHECK_EXCEPTION(xor_file.ignore(1), std::ios_base::failure, HasReason{"AutoFile::ignore: file handle is nullpt"});
|
BOOST_CHECK_EXCEPTION(xor_file.ignore(1), std::ios_base::failure, HasReason{"AutoFile::ignore: file handle is nullpt"});
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
AutoFile xor_file{raw_file("wbx"), xor_pat};
|
#ifdef __MINGW64__
|
||||||
|
// Our usage of mingw-w64 and the msvcrt runtime does not support
|
||||||
|
// the x modifier for the _wfopen().
|
||||||
|
const char* mode = "wb";
|
||||||
|
#else
|
||||||
|
const char* mode = "wbx";
|
||||||
|
#endif
|
||||||
|
AutoFile xor_file{raw_file(mode), xor_pat};
|
||||||
xor_file << test1 << test2;
|
xor_file << test1 << test2;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue