diff options
author | Ron Yorston <rmy@pobox.com> | 2023-08-06 12:40:17 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2023-08-06 12:40:17 +0100 |
commit | 0342f258f74bde329cc98733a3b22196ca1b1bdb (patch) | |
tree | 73a58db17072aef8d3ef26b32d50e45c58dd5167 /libbb | |
parent | 16a2532c519bac11d456f7c71f06d64385f66ed3 (diff) | |
download | busybox-w32-0342f258f74bde329cc98733a3b22196ca1b1bdb.tar.gz busybox-w32-0342f258f74bde329cc98733a3b22196ca1b1bdb.tar.bz2 busybox-w32-0342f258f74bde329cc98733a3b22196ca1b1bdb.zip |
diff: more changes to --binary
The changes introduced to support the --binary option gave incorrect
results when comparing files with CRLF line endings *without* the
--binary option present.
The code needs to keep track of the position within the file and is
confused by text mode.
As an alternative solution, always use binary mode but skip the CR
of a CRLF pair when the --binary option isn't used. This gives
results matching GNU diff when comparing files with matching line
endings, with or without --binary. When line endings differ the
results aren't always the same.
Costs 32 bytes in the 32-bit build, saves 16 in 64-bit.
(GitHub issue #348)
Diffstat (limited to 'libbb')
0 files changed, 0 insertions, 0 deletions