aboutsummaryrefslogtreecommitdiff
path: root/build2/depdb
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-06-03 16:43:46 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-06-18 15:17:29 +0300
commitb0e481a653b01e4329bccb1d101d56e3e878e960 (patch)
treebba1a4cae73ec4ece95f408e079a15d664e49927 /build2/depdb
parent0d692ec857340a0f16a03d6a7ef38fe864a83cfc (diff)
Port to MinGW
Diffstat (limited to 'build2/depdb')
-rw-r--r--build2/depdb12
1 files changed, 11 insertions, 1 deletions
diff --git a/build2/depdb b/build2/depdb
index 74b6678..6dec29e 100644
--- a/build2/depdb
+++ b/build2/depdb
@@ -154,7 +154,17 @@ namespace build2
}
string*
- expect (const path& v) {return expect (v.string ());}
+ expect (const path& v)
+ {
+ string* l (read ());
+ if (l == nullptr || path::traits::compare (*l, v.string ()) != 0)
+ {
+ write (v);
+ return l;
+ }
+
+ return nullptr;
+ }
string*
expect (const char* v)