]>
Commit | Line | Data |
---|---|---|
7db20e36 | 1 | /* sendfile -- copy data directly from one file descriptor to another |
f7a9f785 | 2 | Copyright (C) 1998-2016 Free Software Foundation, Inc. |
d762684b UD |
3 | This file is part of the GNU C Library. |
4 | ||
5 | The GNU C Library is free software; you can redistribute it and/or | |
41bdb6e2 AJ |
6 | modify it under the terms of the GNU Lesser General Public |
7 | License as published by the Free Software Foundation; either | |
8 | version 2.1 of the License, or (at your option) any later version. | |
d762684b UD |
9 | |
10 | The GNU C Library is distributed in the hope that it will be useful, | |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
41bdb6e2 | 13 | Lesser General Public License for more details. |
d762684b | 14 | |
41bdb6e2 | 15 | You should have received a copy of the GNU Lesser General Public |
59ba27a6 PE |
16 | License along with the GNU C Library; if not, see |
17 | <http://www.gnu.org/licenses/>. */ | |
d762684b UD |
18 | |
19 | #ifndef _SYS_SENDFILE_H | |
20 | #define _SYS_SENDFILE_H 1 | |
21 | ||
22 | #include <features.h> | |
23 | #include <sys/types.h> | |
24 | ||
25 | __BEGIN_DECLS | |
26 | ||
131c6eb7 RM |
27 | /* Send up to COUNT bytes from file associated with IN_FD starting at |
28 | *OFFSET to descriptor OUT_FD. Set *OFFSET to the IN_FD's file position | |
29 | following the read bytes. If OFFSET is a null pointer, use the normal | |
30 | file position instead. Return the number of written bytes, or -1 in | |
31 | case of error. */ | |
2afdb783 UD |
32 | #ifndef __USE_FILE_OFFSET64 |
33 | extern ssize_t sendfile (int __out_fd, int __in_fd, off_t *__offset, | |
c179df4e | 34 | size_t __count) __THROW; |
2afdb783 | 35 | #else |
f377d022 UD |
36 | # ifdef __REDIRECT_NTH |
37 | extern ssize_t __REDIRECT_NTH (sendfile, | |
38 | (int __out_fd, int __in_fd, __off64_t *__offset, | |
c179df4e | 39 | size_t __count), sendfile64); |
2afdb783 UD |
40 | # else |
41 | # define sendfile sendfile64 | |
42 | # endif | |
43 | #endif | |
44 | #ifdef __USE_LARGEFILE64 | |
45 | extern ssize_t sendfile64 (int __out_fd, int __in_fd, __off64_t *__offset, | |
c179df4e | 46 | size_t __count) __THROW; |
2afdb783 | 47 | #endif |
d762684b UD |
48 | |
49 | __END_DECLS | |
50 | ||
51 | #endif /* sys/sendfile.h */ |