From d45dbc807adc05bc03437116659c6abd4f5174c8 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 17 Jun 2015 11:10:51 +0200 Subject: Use portable ifdstream from libbutl instead of GNU stdio_filebuf --- build/buildfile | 4 +++- build/cxx/module.cxx | 8 +++----- build/cxx/rule.cxx | 8 +++----- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/build/buildfile b/build/buildfile index 9ea95d5..7d3a32a 100644 --- a/build/buildfile +++ b/build/buildfile @@ -1,3 +1,5 @@ +import libs += libbutl + config = config/{operation module utility} bin = bin/{target rule module} cxx = cxx/{target rule module} @@ -5,7 +7,7 @@ cxx = cxx/{target rule module} exe{b}: cxx{b algorithm name operation spec scope variable target \ prerequisite rule file module context search diagnostics token lexer \ parser process timestamp path path-io utility filesystem dump options \ - $config $bin $cxx} + $config $bin $cxx} $libs #@@ TODO # diff --git a/build/cxx/module.cxx b/build/cxx/module.cxx index a511757..6efc1ed 100644 --- a/build/cxx/module.cxx +++ b/build/cxx/module.cxx @@ -4,8 +4,7 @@ #include -#include -#include +#include #include #include @@ -17,6 +16,7 @@ #include using namespace std; +using namespace butl; namespace build { @@ -68,9 +68,7 @@ namespace build try { process pr (args, false, false, true); - - __gnu_cxx::stdio_filebuf fb (pr.in_ofd, ios_base::in); - istream is (&fb); + ifdstream is (pr.in_ofd); bool r (getline (is, ver)); diff --git a/build/cxx/rule.cxx b/build/cxx/rule.cxx index 9248777..f63c92a 100644 --- a/build/cxx/rule.cxx +++ b/build/cxx/rule.cxx @@ -9,9 +9,8 @@ #include // size_t #include // exit #include // move() -#include -#include +#include #include #include @@ -26,6 +25,7 @@ #include using namespace std; +using namespace butl; namespace build { @@ -279,9 +279,7 @@ namespace build try { process pr (args.data (), false, false, true); - - __gnu_cxx::stdio_filebuf fb (pr.in_ofd, ios_base::in); - istream is (&fb); + ifdstream is (pr.in_ofd); for (bool first (true); !is.eof (); ) { -- cgit v1.1