diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-07-21 20:30:48 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-07-21 20:30:48 +0200 |
commit | ade763571a19b5e222ac626a6b3bc10685e542a1 (patch) | |
tree | 1ca2d4c6cde1e679c96d6d766d51a869d63c32b1 | |
parent | 427d52675678b4a3c1dc4da1ea8ded971bb93c46 (diff) |
Use binary mode when pre-parsing translation unit
Failed that, the module export position we obtain cannot be reliably seeked
to.
-rw-r--r-- | build2/cc/compile.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/build2/cc/compile.cxx b/build2/cc/compile.cxx index 681cfc9..76be8e6 100644 --- a/build2/cc/compile.cxx +++ b/build2/cc/compile.cxx @@ -2431,8 +2431,9 @@ namespace build2 env.empty () ? nullptr : env.data ()); } - ifdstream is (move (pr.in_ofd), - fdstream_mode::text | fdstream_mode::skip); + // Use binary mode to obtain consistent positions. + // + ifdstream is (move (pr.in_ofd), fdstream_mode::skip); parser p; translation_unit tu (p.parse (is, rels)); |