]>
Commit | Line | Data |
---|---|---|
cb0f97b2 | 1 | .\" Copyright (c) 2020-2022 by Alejandro Colomar <alx@kernel.org> |
d3e46cf2 AC |
2 | .\" and Copyright (c) 2020 by Michael Kerrisk <mtk.manpages@gmail.com> |
3 | .\" | |
4 | .\" SPDX-License-Identifier: Linux-man-pages-copyleft | |
5 | .\" | |
6 | .\" | |
4c1c5274 | 7 | .TH off_t 3type (date) "Linux man-pages (unreleased)" |
d3e46cf2 AC |
8 | .SH NAME |
9 | off_t, off64_t, loff_t \- file sizes | |
10 | .SH LIBRARY | |
11 | Standard C library | |
12 | .RI ( libc ) | |
13 | .SH SYNOPSIS | |
14 | .nf | |
15 | .B #include <sys/types.h> | |
16 | .PP | |
17 | .BR typedef " /* ... */ " off_t; | |
18 | .PP | |
19 | .B #define _LARGEFILE64_SOURCE | |
20 | .B #include <sys/types.h> | |
21 | .PP | |
22 | .BR typedef " /* ... */ " off64_t; | |
23 | .PP | |
24 | .B #define _GNU_SOURCE | |
25 | .B #include <sys/types.h> | |
26 | .PP | |
27 | .BR typedef " /* ... */ " loff_t; | |
28 | .fi | |
29 | .SH DESCRIPTION | |
30 | .I off_t | |
31 | is used for describing file sizes. | |
2325c425 | 32 | It is a signed integer type. |
d3e46cf2 AC |
33 | .PP |
34 | .I off64_t | |
35 | is a 64-bit version of the type, | |
36 | used in glibc. | |
37 | .PP | |
38 | .I loff_t | |
39 | is a 64-bit version of the type, | |
40 | introduced by the Linux kernel. | |
41 | .SH VERSIONS | |
42 | .I <aio.h> | |
43 | and | |
44 | .I <stdio.h> | |
45 | define | |
46 | .I off_t | |
47 | since POSIX.1-2008. | |
3113c7f3 | 48 | .SH STANDARDS |
d3e46cf2 AC |
49 | .PD 0 |
50 | .IR off_t : | |
51 | POSIX.1-2001 and later. | |
52 | .PP | |
53 | .IR off64_t : | |
54 | Present in glibc and some BSDs. | |
55 | .PP | |
56 | .IR loff_t : | |
57 | Linux-specific. | |
58 | .PD | |
59 | .SH NOTES | |
60 | On some architectures, | |
61 | the width of | |
62 | .I off_t | |
63 | can be controlled with the feature test macro | |
64 | .BR _FILE_OFFSET_BITS . | |
65 | .PP | |
66 | The following headers also provide | |
67 | .IR off_t : | |
68 | .IR <aio.h> , | |
69 | .IR <fcntl.h> , | |
70 | .IR <stdio.h> , | |
71 | .IR <sys/mman.h> , | |
72 | .IR <sys/stat.h> , | |
73 | and | |
74 | .IR <unistd.h> . | |
75 | .SH SEE ALSO | |
76 | .BR copy_file_range (2), | |
77 | .BR llseek (2), | |
78 | .BR lseek (2), | |
79 | .BR mmap (2), | |
80 | .BR posix_fadvise (2), | |
81 | .BR pread (2), | |
82 | .BR readahead (2), | |
83 | .BR sync_file_range (2), | |
84 | .BR truncate (2), | |
85 | .BR fseeko (3), | |
86 | .BR lockf (3), | |
87 | .BR lseek64 (3), | |
88 | .BR posix_fallocate (3), | |
89 | .BR feature_test_macros (7) |