Page MenuHomePhabricator

utils: Add fstream wrapper to allow to pass unicode filename on Windows

Authored by Fabien on Mon, Mar 23, 10:47.


If compiled with mingw, use glibc++ extension stdio_filebuf to open the
file by FILE* instead of filename.

In other condition, we can use boost::fstream.

Backport of core PR13878 and PR15468 (related bug fix).

Depends on D5539.

Test Plan
ninja check
make check

Run the Gitian builds.

Build and run for Windows. Run test_bitcoin on Windows.

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.Mon, Mar 23, 10:47
Herald added a reviewer: Restricted Project. · View Herald TranscriptMon, Mar 23, 10:47
teamcity edited the summary of this revision. (Show Details)Mon, Mar 23, 10:47

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

jasonbcox accepted this revision.Mon, Mar 23, 22:05
This revision is now accepted and ready to land.Mon, Mar 23, 22:05