HomePhabricator

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

Description

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

Summary:

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.

Reviewers: #bitcoin_abc, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D5539

Details

Provenance
Chun Kuan Lee <ken2812221@gmail.com>Authored on Aug 4 2018, 13:27
FabienCommitted on Mar 24 2020, 09:35
FabienPushed on Mar 24 2020, 09:35
Reviewer
Restricted Project
Differential Revision
D5539: utils: Add fstream wrapper to allow to pass unicode filename on Windows
Parents
rABCe4064a672826: utils: Convert fs error messages from multibyte to utf-8
Branches
Unknown
Tags
Unknown