]> git.ipfire.org Git - thirdparty/coreutils.git/commit
cp: port better to old limited hosts
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 5 Aug 2025 22:45:35 +0000 (15:45 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 16 Sep 2025 06:17:34 +0000 (23:17 -0700)
commit5b5dcb70566f9622573d54eb2cc32184e953d9cc
treeac106f9b115875f57df64bea6002df11b343d91d
parent06a6758d036886d2e13c0c936fd65cee9eb223b4
cp: port better to old limited hosts

Port better ancient platforms where OFF_T_MAX is only 2**31 - 1,
but some devices have more than that many bytes.
* src/copy-file-data.c (copy_file_data): Byte count is now
count_t, not off_t.  All callers changed.  Since we need to check
for overflow anyway, also check for too-small calls to fadvise.
src/copy-file-data.c
src/copy.c
src/copy.h