Linux: consolidate sendfile implementation
commit04e7e2658c4ffe1a96fb445cbfe583a9d51ca622
authorAdhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Wed, 19 Oct 2022 22:14:18 +0000 (19 19:14 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 7 Dec 2022 14:27:01 +0000 (7 11:27 -0300)
tree0352bc9e1ff77373b554107bada6401410a03659
parent9cffb295e3af682bcc1c2629e808e3db8a4e2cbf
Linux: consolidate sendfile implementation

This is similar to other LFS consolidation, where the non-LFS is only
built if __OFF_T_MATCHES_OFF64_T is not defined and the LFS version
is aliased to non-LFS name if __OFF_T_MATCHES_OFF64_T is defined.

For non-LFS variant, use sendfile syscall if defined, otherwise use
sendfile64 plus the offset overflow check (as generic implementation).

Checked on x86_64-linux-gnu.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
sysdeps/unix/sysv/linux/mips/mips64/n64/sendfile64.c [deleted file]
sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list [deleted file]
sysdeps/unix/sysv/linux/sendfile.c [copied from sysdeps/unix/sysv/linux/generic/wordsize-32/sendfile.c with 77% similarity]
sysdeps/unix/sysv/linux/sendfile64.c [moved from sysdeps/unix/sysv/linux/generic/wordsize-32/sendfile.c with 65% similarity]
sysdeps/unix/sysv/linux/syscalls.list
sysdeps/unix/sysv/linux/wordsize-64/sendfile64.c [deleted file]
sysdeps/unix/sysv/linux/wordsize-64/syscalls.list