aboutsummaryrefslogtreecommitdiff
path: root/build2/cc/link-rule.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-11-20 12:08:36 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-11-20 12:10:41 +0200
commite4c4d8d65ea675eaa56c85661ba42e112ab70f4b (patch)
tree6f60d93f962bdf85ad92e8bb8bd49646cb62cab4 /build2/cc/link-rule.cxx
parentcf6374ec9a2fc3c765a07dcad73e05ea757ee477 (diff)
Improve workaround for backwards modification time issue
Diffstat (limited to 'build2/cc/link-rule.cxx')
-rw-r--r--build2/cc/link-rule.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/build2/cc/link-rule.cxx b/build2/cc/link-rule.cxx
index c4fd82b..981358e 100644
--- a/build2/cc/link-rule.cxx
+++ b/build2/cc/link-rule.cxx
@@ -2071,12 +2071,12 @@ namespace build2
if (dd.writing () || dd.mtime > mt)
scratch = update = true;
-#define MTIME_SANITY_CHECK
-#ifdef MTIME_SANITY_CHECK
+#define BUILD2_MTIME_CHECK
+#ifdef BUILD2_MTIME_CHECK
timestamp dd_tt (system_clock::now ());
#endif
- timestamp dd_ct (dd.close ());
+ dd.close ();
// If nothing changed, then we are done.
//
@@ -2560,7 +2560,7 @@ namespace build2
rm.cancel ();
-#ifdef MTIME_SANITY_CHECK
+#ifdef BUILD2_MTIME_CHECK
{
timestamp tp_mt (file_mtime (tp));
timestamp dd_mt (file_mtime (dd.path));
@@ -2568,11 +2568,11 @@ 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";
+ << dd_tt << " window start\n"
+ << dd.mtime << " close mtime\n"
+ << dd_mt << " " << dd.path.string () << '\n'
+ << tp_mt << " " << tp.string () << '\n'
+ << tp_tt << " window end";
}
#endif