Debian Codegraph @

upstream/debian-unstable/man3/off_t.3type

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