]> git.ipfire.org Git - thirdparty/glibc.git/blame - io/sys/statvfs.h
Update copyright dates with scripts/update-copyrights
[thirdparty/glibc.git] / io / sys / statvfs.h
CommitLineData
867506f3 1/* Definitions for getting information about a filesystem.
2b778ceb 2 Copyright (C) 1998-2021 Free Software Foundation, Inc.
867506f3
UD
3 This file is part of the GNU C Library.
4
5 The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
867506f3
UD
9
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 13 Lesser General Public License for more details.
867506f3 14
41bdb6e2 15 You should have received a copy of the GNU Lesser General Public
59ba27a6 16 License along with the GNU C Library; if not, see
5a82c748 17 <https://www.gnu.org/licenses/>. */
867506f3
UD
18
19#ifndef _SYS_STATVFS_H
20#define _SYS_STATVFS_H 1
21
22#include <features.h>
23
24/* Get the system-specific definition of `struct statfs'. */
25#include <bits/statvfs.h>
26
0ed99ce4
UD
27#ifndef __USE_FILE_OFFSET64
28# ifndef __fsblkcnt_t_defined
29typedef __fsblkcnt_t fsblkcnt_t; /* Type to count file system blocks. */
30# define __fsblkcnt_t_defined
31# endif
32# ifndef __fsfilcnt_t_defined
33typedef __fsfilcnt_t fsfilcnt_t; /* Type to count file system inodes. */
34# define __fsfilcnt_t_defined
35# endif
36#else
37# ifndef __fsblkcnt_t_defined
38typedef __fsblkcnt64_t fsblkcnt_t; /* Type to count file system blocks. */
39# define __fsblkcnt_t_defined
40# endif
41# ifndef __fsfilcnt_t_defined
42typedef __fsfilcnt64_t fsfilcnt_t; /* Type to count file system inodes. */
43# define __fsfilcnt_t_defined
44# endif
45#endif
46
867506f3
UD
47__BEGIN_DECLS
48
49/* Return information about the filesystem on which FILE resides. */
867506f3 50#ifndef __USE_FILE_OFFSET64
a784e502 51extern int statvfs (const char *__restrict __file,
8a1f658b
UD
52 struct statvfs *__restrict __buf)
53 __THROW __nonnull ((1, 2));
867506f3 54#else
f377d022
UD
55# ifdef __REDIRECT_NTH
56extern int __REDIRECT_NTH (statvfs,
a784e502 57 (const char *__restrict __file,
8a1f658b
UD
58 struct statvfs *__restrict __buf), statvfs64)
59 __nonnull ((1, 2));
01cad722 60# else
1bc21e7a 61# define statvfs statvfs64
01cad722 62# endif
867506f3
UD
63#endif
64#ifdef __USE_LARGEFILE64
a784e502 65extern int statvfs64 (const char *__restrict __file,
8a1f658b
UD
66 struct statvfs64 *__restrict __buf)
67 __THROW __nonnull ((1, 2));
867506f3
UD
68#endif
69
70/* Return information about the filesystem containing the file FILDES
71 refers to. */
867506f3 72#ifndef __USE_FILE_OFFSET64
8a1f658b
UD
73extern int fstatvfs (int __fildes, struct statvfs *__buf)
74 __THROW __nonnull ((2));
867506f3 75#else
f377d022
UD
76# ifdef __REDIRECT_NTH
77extern int __REDIRECT_NTH (fstatvfs, (int __fildes, struct statvfs *__buf),
8a1f658b 78 fstatvfs64) __nonnull ((2));
01cad722 79# else
1bc21e7a 80# define fstatvfs fstatvfs64
01cad722 81# endif
867506f3
UD
82#endif
83#ifdef __USE_LARGEFILE64
8a1f658b
UD
84extern int fstatvfs64 (int __fildes, struct statvfs64 *__buf)
85 __THROW __nonnull ((2));
867506f3
UD
86#endif
87
88__END_DECLS
89
90#endif /* sys/statvfs.h */