]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3type/off_t.3type
Many pages: Use correct letter case in page titles (TH)
[thirdparty/man-pages.git] / man3type / off_t.3type
CommitLineData
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
9off_t, off64_t, loff_t \- file sizes
10.SH LIBRARY
11Standard 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
31is used for describing file sizes.
2325c425 32It is a signed integer type.
d3e46cf2
AC
33.PP
34.I off64_t
35is a 64-bit version of the type,
36used in glibc.
37.PP
38.I loff_t
39is a 64-bit version of the type,
40introduced by the Linux kernel.
41.SH VERSIONS
42.I <aio.h>
43and
44.I <stdio.h>
45define
46.I off_t
47since POSIX.1-2008.
3113c7f3 48.SH STANDARDS
d3e46cf2
AC
49.PD 0
50.IR off_t :
51POSIX.1-2001 and later.
52.PP
53.IR off64_t :
54Present in glibc and some BSDs.
55.PP
56.IR loff_t :
57Linux-specific.
58.PD
59.SH NOTES
60On some architectures,
61the width of
62.I off_t
63can be controlled with the feature test macro
64.BR _FILE_OFFSET_BITS .
65.PP
66The 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> ,
73and
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)