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