diff options
Diffstat (limited to 'man2/splice.2')
-rw-r--r-- | man2/splice.2 | 47 |
1 files changed, 29 insertions, 18 deletions
diff --git a/man2/splice.2 b/man2/splice.2 index a704f2f95..88d416049 100644 --- a/man2/splice.2 +++ b/man2/splice.2 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH splice 2 2023-02-05 "Linux man-pages 6.03" +.TH splice 2 2023-07-15 "Linux man-pages 6.05.01" .SH NAME splice \- splice data to/from a pipe .SH LIBRARY @@ -12,10 +12,11 @@ Standard C library .SH SYNOPSIS .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B "#define _FILE_OFFSET_BITS 64 .B #include <fcntl.h> .PP -.BI "ssize_t splice(int " fd_in ", off64_t *_Nullable " off_in , -.BI " int " fd_out ", off64_t *_Nullable " off_out , +.BI "ssize_t splice(int " fd_in ", off_t *_Nullable " off_in , +.BI " int " fd_out ", off_t *_Nullable " off_out , .BI " size_t " len ", unsigned int " flags ); .\" Return type was long before glibc 2.7 .fi @@ -176,13 +177,21 @@ Either or .I off_out was not NULL, but the corresponding file descriptor refers to a pipe. -.SH VERSIONS -The -.BR splice () -system call first appeared in Linux 2.6.17; -library support was added in glibc 2.5. .SH STANDARDS -This system call is Linux-specific. +Linux. +.SH HISTORY +Linux 2.6.17, +glibc 2.5. +.PP +In Linux 2.6.30 and earlier, +exactly one of +.I fd_in +and +.I fd_out +was required to be a pipe. +Since Linux 2.6.31, +.\" commit 7c77f0b3f9208c339a4b40737bb2cb0f0319bb8d +both arguments may refer to pipes. .SH NOTES The three system calls .BR splice (), @@ -235,15 +244,17 @@ only pointers are copied, not the pages of the buffer. .\" users - for things like logging etc.). .\" .PP -In Linux 2.6.30 and earlier, -exactly one of -.I fd_in -and -.I fd_out -was required to be a pipe. -Since Linux 2.6.31, -.\" commit 7c77f0b3f9208c339a4b40737bb2cb0f0319bb8d -both arguments may refer to pipes. +.B _FILE_OFFSET_BITS +should be defined to be 64 in code that uses non-null +.I off_in +or +.I off_out +or that takes the address of +.BR splice , +if the code is intended to be portable +to traditional 32-bit x86 and ARM platforms where +.BR off_t 's +width defaults to 32 bits. .SH EXAMPLES See .BR tee (2). |