diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-10-18 10:36:25 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-10-18 10:36:51 +0200 |
commit | 9c5f0d542d1db507b3b9c87bd9de6d0d758d51c1 (patch) | |
tree | f0d1002150736e11c1ce7639fe5a9e0093192e77 /src/util.cpp | |
parent | 041224a75c16a2c181ca2305d12b63396e60d922 (diff) | |
parent | 43c7fbb1e79a4a2219306bf3da1a2dfdf9213f2c (diff) |
Merge #13878: utils: Add fstream wrapper to allow to pass unicode filename on Windows
43c7fbb1e79a4a2219306bf3da1a2dfdf9213f2c Make MSVC compiler read the source code using utf-8 (Chun Kuan Lee)
f86a571edb9627c126b9ccd7da68bd7d1657b8f8 tests: Add test case for std::ios_base::ate (Chun Kuan Lee)
a554cc901a32f41162089d6b20ad39d5aeff0583 Move boost/std fstream to fsbridge (Chun Kuan Lee)
86eb3b3f1ab594142b6baa9576717ff121f3b745 utils: Add fsbridge fstream function wrapper (Chun Kuan Lee)
Pull request description:
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.
Tree-SHA512: b5dbd83e347fb9b2a0c8b1c2c7bd71a272e839ec0617883b2a0ec12506ae9e825373cf6e95b9bcc91d7edc85bf51580a7716b56a9ecaad776bc3ae61638cb3da
Diffstat (limited to 'src/util.cpp')
-rw-r--r-- | src/util.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util.cpp b/src/util.cpp index 1002302904..6479b9b9ce 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -892,7 +892,7 @@ bool ArgsManager::ReadConfigFiles(std::string& error, bool ignore_invalid_keys) } const std::string confPath = GetArg("-conf", BITCOIN_CONF_FILENAME); - fs::ifstream stream(GetConfigFile(confPath)); + fsbridge::ifstream stream(GetConfigFile(confPath)); // ok to not have a config file if (stream.good()) { @@ -925,7 +925,7 @@ bool ArgsManager::ReadConfigFiles(std::string& error, bool ignore_invalid_keys) } for (const std::string& to_include : includeconf) { - fs::ifstream include_config(GetConfigFile(to_include)); + fsbridge::ifstream include_config(GetConfigFile(to_include)); if (include_config.good()) { if (!ReadConfigStream(include_config, error, ignore_invalid_keys)) { return false; |