[libcxx-commits] [libcxx] [libc++] use copy_file_range for fs::copy (PR #109211)
Jannik Glückert via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Sep 19 22:47:53 PDT 2024
Jannik2099 wrote:
> FreeBSD does have sendfile, but it does NOT have sys/sendfile.h, which means libc++ has been doing userspace copies on FreeBSD all this time!
so turns out that was on purpose, because FreeBSD `sendfile` cannot send to files - I had assumed it was one of those "ancient unix syscalls that made it's way into every OS".
I'll have to restructure this a bit then.
Unrelated, I also took the opportunity to support copying special zero-length files on linux (such as those in `/proc`). Funnily enough, we discovered the same deficiency in libstdc++ when I was adding `copy_file_range` support there.
https://github.com/llvm/llvm-project/pull/109211
More information about the libcxx-commits
mailing list