diff options
-rw-r--r-- | build2/cc/link-rule.cxx | 3 | ||||
-rw-r--r-- | build2/depdb.cxx | 6 | ||||
-rw-r--r-- | build2/depdb.hxx | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/build2/cc/link-rule.cxx b/build2/cc/link-rule.cxx index d8434d8..c4fd82b 100644 --- a/build2/cc/link-rule.cxx +++ b/build2/cc/link-rule.cxx @@ -2076,7 +2076,7 @@ namespace build2 timestamp dd_tt (system_clock::now ()); #endif - dd.close (); + timestamp dd_ct (dd.close ()); // If nothing changed, then we are done. // @@ -2569,6 +2569,7 @@ namespace build2 if (dd_mt > tp_mt) fail << "backwards modification times:\n" << dd_tt << " window start\n" + << dd_ct << " close mtime\n" << dd_mt << " " << dd.path.string () << '\n' << tp_mt << " " << tp.string () << '\n' << tp_tt << " window end"; diff --git a/build2/depdb.cxx b/build2/depdb.cxx index 416f1f4..8abd5f2 100644 --- a/build2/depdb.cxx +++ b/build2/depdb.cxx @@ -201,7 +201,7 @@ namespace build2 fs_.put ('\n'); } - void depdb:: + timestamp depdb:: close () { // If we are at eof, then it means all lines are good, there is the "end @@ -263,7 +263,9 @@ namespace build2 // #if defined(_WIN32) || defined(__FreeBSD__) if (state_ == state::write) - file_mtime (path); + mtime = file_mtime (path); #endif + + return mtime; } } diff --git a/build2/depdb.hxx b/build2/depdb.hxx index 7c9e464..ffb3b89 100644 --- a/build2/depdb.hxx +++ b/build2/depdb.hxx @@ -90,7 +90,7 @@ namespace build2 // may be left in the old/currupt state. Note that in the read mode this // function will "chop off" lines that haven't been read. // - void + timestamp close (); // Read the next line. If the result is not NULL, then it is a pointer to |