13.116.6 copy_file_range ¶
Documentation:
Gnulib module: copy-file-range
Portability problems fixed by Gnulib:
- This function exists only on Linux and FreeBSD and is therefore
missing on many platforms:
glibc 2.26, macOS 14, FreeBSD 12.0, NetBSD 10.0, OpenBSD 7.5, Minix 3.1.8, AIX 7.1, HP-UX 11.31, Solaris 11.4, Cygwin 2.9, mingw, MSVC 14, Android API level 33.
But the replacement function is only a stub: It always fails with error
ENOSYS.
- This function has many problems on Linux kernel versions before 5.3.
See https://lwn.net/Articles/789527/.
On these kernel versions, the replacement function always fails with
error
ENOSYS.
- This function returns an incorrect value when the number of bytes copied
exceeds
INT_MAX on systems using glibc version 2.41 or 2.42.
See https://sourceware.org/PR33245.
- This function is provided on GNU/Hurd but it is only a stub: It always
fails with error
ENOSYS.
Portability problems not fixed by Gnulib:
- If built with include files for Linux kernel 5.3 or later,
the Gnulib substitute may misbehave when run on Linux kernel 5.2 or earlier.
A similar problem exists if built with include files for glibc 2.43 or later,
and run on glibc 2.41 or 2.42.