Skip to contentSkip to conversation

copy_file_range: update for glibc compatibility

PATCH In review Shawn Landden 2 participants 2 messages Jan 1, 2018 – Jan 8, 2018 1 message not in the archive Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 copy_file_range: update for glibc compatibility

---
 man2/copy_file_range.2 | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
man2/copy_file_range.2 +5 -4
index 6e50ea6ec..3a3a6aa9f 100644
@@ -27,7 +27,7 @@
 copy_file_range \- Copy a range of data from one file to another
 .SH SYNOPSIS
 .nf
-.B #include <sys/syscall.h>
+.B #define _GNU_SOURCE
 .B #include <unistd.h>
 .PP
 .BI "ssize_t copy_file_range(int " fd_in ", loff_t *" off_in ,
@@ -124,12 +124,13 @@ are not on the same mounted filesystem.
 .SH VERSIONS
 The
 .BR copy_file_range ()
-system call first appeared in Linux 4.5.
-Library support was added in glibc 2.27.
+system call first appeared in Linux 4.5, but glibc 2.27 provides a user-space
+emulation when it is not available.
+.\" https://sourceware.org/git/?p=glibc.git;a=commit;f=posix/unistd.h;h=bad7a0c81f501fbbcc79af9eaa4b8254441c4a1f
 .SH CONFORMING TO
 The
 .BR copy_file_range ()
-system call is a nonstandard Linux extension.
+system call is a nonstandard Linux and GNU extension.
 .SH NOTES
 If
 .I file_in
Signature · 6 lines
2.14.1

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20180101041259.642-1-slandden-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#2 lore raw
Quoted 1 line · Shawn Landden

Thanks, Shawn. Applied.

Cheers,

Michael

Quoted 35 lines
---
 man2/copy_file_range.2 | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
man2/copy_file_range.2 +5 -4
index 6e50ea6ec..3a3a6aa9f 100644
@@ -27,7 +27,7 @@
 copy_file_range \- Copy a range of data from one file to another
 .SH SYNOPSIS
 .nf
-.B #include <sys/syscall.h>
+.B #define _GNU_SOURCE
 .B #include <unistd.h>
 .PP
 .BI "ssize_t copy_file_range(int " fd_in ", loff_t *" off_in ,
@@ -124,12 +124,13 @@ are not on the same mounted filesystem.
 .SH VERSIONS
 The
 .BR copy_file_range ()
-system call first appeared in Linux 4.5.
-Library support was added in glibc 2.27.
+system call first appeared in Linux 4.5, but glibc 2.27 provides a user-space
+emulation when it is not available.
+.\" https://sourceware.org/git/?p=glibc.git;a=commit;f=posix/unistd.h;h=bad7a0c81f501fbbcc79af9eaa4b8254441c4a1f
 .SH CONFORMING TO
 The
 .BR copy_file_range ()
-system call is a nonstandard Linux extension.
+system call is a nonstandard Linux and GNU extension.
 .SH NOTES
 If
 .I file_in
Signature · 7 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html