make-file: Pass O_BINARY or O_TEXT to open() call in replace_file_start().
authorBen Pfaff <blp@cs.stanford.edu>
Wed, 2 Sep 2020 04:42:35 +0000 (21:42 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Wed, 2 Sep 2020 04:42:35 +0000 (21:42 -0700)
commit4f36eb1c4b91f2ba7d95314e9b49cd643a01df46
tree616239fa9c39157a9c7fcc104a391fcef7bc63df
parent96edf7b5604826c430869f789197db1286e2e73c
make-file: Pass O_BINARY or O_TEXT to open() call in replace_file_start().

It's hard to imagine why this would make a difference on a real system,
because the file descriptor obtained from open() is passed to fdopen(),
which is documented to determine whether the stream is text or binary
based on the mode string.  However, bug #40223 implies that it makes a
difference.  I hope that this commit fixes the problem (if any!).

Thanks to the anonymous submitter of bug #40223.
src/data/make-file.c