diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2019-11-08 00:17:47 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2019-11-11 18:41:06 +0300 |
commit | 07e0d37aba5cd72ff2d53eda654a4d5466e38627 (patch) | |
tree | 80ab6452b0fc489833fb911926ca872e51ec1575 /libbuild2/config/init.cxx | |
parent | 5935476651cd063a53d08ec33b04513a7a8127e3 (diff) |
Use path_name for `-` to stdin/stdout translation
Diffstat (limited to 'libbuild2/config/init.cxx')
-rw-r--r-- | libbuild2/config/init.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/libbuild2/config/init.cxx b/libbuild2/config/init.cxx index 890efa3..bcaea83 100644 --- a/libbuild2/config/init.cxx +++ b/libbuild2/config/init.cxx @@ -131,7 +131,7 @@ namespace build2 // never be init'ed). // auto load_config = [&rs, &c_v] (istream& is, - const path& f, + const path_name& in, const location& l) { // Check the config version. We assume that old versions cannot @@ -149,7 +149,7 @@ namespace build2 // that we won't have the config.version variable entered in the scope // but that is harmless (we could do it manually if necessary). // - lexer lex (is, f); + lexer lex (is, in); // Assume missing version is 0. // @@ -157,7 +157,7 @@ namespace build2 uint64_t v (p.second ? cast<uint64_t> (p.first) : 0); if (v != module::version) - fail (l) << "incompatible config file " << f << + fail (l) << "incompatible config file " << in << info << "config file version " << v << (p.second ? "" : " (missing)") << info << "config module version " << module::version << @@ -169,11 +169,9 @@ namespace build2 auto load_config_file = [&load_config] (const path& f, const location& l) { - // @@ PATH_NAME TODO - // path_name fn (f); ifdstream ifs; - load_config (open_file_or_stdin (fn, ifs), f /* fn */, l); + load_config (open_file_or_stdin (fn, ifs), fn, l); }; { @@ -211,7 +209,7 @@ namespace build2 assert (false); #else istringstream is (host_config); - load_config (is, f, l); + load_config (is, path_name (s), l); #endif } else |