From 855487ff2c87ca482dbb4f5891954bf741caa370 Mon Sep 17 00:00:00 2001 From: q66 Date: Thu, 16 Feb 2017 20:53:14 +0100 Subject: [PATCH] fix build --- main.cc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/main.cc b/main.cc index 74b7d66..cec11e6 100644 --- a/main.cc +++ b/main.cc @@ -11,7 +11,6 @@ #include #include #include -#include #include #include @@ -93,7 +92,7 @@ static bool ob_expand_dir( std::string &ret, string_range dir, std::vector const &parts, string_range slash ) { - ostd::DirectoryStream d(dir); + ostd::directory_stream d{dir}; bool appended = false; if (!d.is_open()) { return false; @@ -117,7 +116,7 @@ static bool ob_expand_dir( continue; } /* no further star, just do file test */ - if (!ostd::FileStream(afn, ostd::StreamMode::read).is_open()) { + if (!ostd::file_stream{afn, ostd::stream_mode::READ}.is_open()) { continue; } if (!ret.empty()) { @@ -190,8 +189,8 @@ static bool ob_check_ts( string_range tname, std::vector const &deps ) { auto get_ts = [](string_range fname) { - ostd::FileInfo fi(fname); - if (fi.type() != ostd::FileType::regular) { + ostd::file_info fi{fname}; + if (fi.type() != ostd::file_type::REGULAR) { return time_t(0); } return fi.mtime(); @@ -210,7 +209,7 @@ static bool ob_check_ts( } static bool ob_check_file(string_range fname) { - return ostd::FileStream(fname, ostd::StreamMode::read).is_open(); + return ostd::file_stream{fname, ostd::stream_mode::READ}.is_open(); } static bool ob_check_exec( @@ -573,7 +572,7 @@ struct ObState: cs_state { } int print_help(bool is_error, string_range deffile) { - ostd::Stream &os = is_error ? ostd::err : ostd::out; + ostd::stream &os = is_error ? ostd::err : ostd::out; os.writeln( "Usage: ", progname, " [options] [action]\n", "Options:\n"