RELEASE, man-pages-6.01.Announce: Remove .Announce file
[man-pages.git] / man3type / off_t.3type
blob59056909d6c39a657f8a6b143dc8d007bead0b17
1 .\" Copyright (c) 2020-2022 by Alejandro Colomar <colomar.6.4.3@gmail.com>
2 .\" and Copyright (c) 2020 by Michael Kerrisk <mtk.manpages@gmail.com>
3 .\"
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
5 .\"
6 .\"
7 .TH OFF_T 3type (date) "Linux man-pages (unreleased)"
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.
32 It is a signed integer type.
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.
48 .SH STANDARDS
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)