diff options
-rw-r--r-- | build2/cc/lexer.cxx | 2 | ||||
-rw-r--r-- | build2/depdb.cxx | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/build2/cc/lexer.cxx b/build2/cc/lexer.cxx index d1a9115..15627c7 100644 --- a/build2/cc/lexer.cxx +++ b/build2/cc/lexer.cxx @@ -118,7 +118,7 @@ namespace build2 // Increment the logical line similar to how base will increment the // physical (the column counts are the same). // - if (log_line_ && c == '\n' && !unget_ && !unpeek_) + if (log_line_ && c == '\n' && !unget_) ++*log_line_; base::get (c); 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); |