aboutsummaryrefslogtreecommitdiff
path: root/build2/depdb.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-12-15 17:19:47 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-12-15 17:19:47 +0300
commitdaa816fc2e7c6cbb669ba030d45dd979ef37f7c2 (patch)
treee184a19e2033a997539a81f9045ad0da6fbcf219 /build2/depdb.cxx
parentffd31a88c349661bd624661f76492e70e287b845 (diff)
Fix line counting in cc::lexer
Diffstat (limited to 'build2/depdb.cxx')
-rw-r--r--build2/depdb.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/build2/depdb.cxx b/build2/depdb.cxx
index f89daba..c963387 100644
--- a/build2/depdb.cxx
+++ b/build2/depdb.cxx
@@ -117,7 +117,9 @@ namespace build2
if (trunc)
fdtruncate (fd.get (), pos_);
- // Note: seek is required to switch from reading to writing.
+ // Note: the file descriptor position can be beyond the pos_ value due to
+ // the ifdstream buffering. That's why we need to seek to switch from
+ // reading to writing.
//
fdseek (fd.get (), pos_, fdseek_mode::set);