1 /* Copyright (C) 2011-2022 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library. If not, see
16 <https://www.gnu.org/licenses/>. */
19 # error "Never include <bits/statfs.h> directly; use <sys/statfs.h> instead."
22 #include <bits/endian.h>
23 #include <bits/types.h>
24 #include <bits/wordsize.h>
26 #if defined __USE_FILE_OFFSET64
27 # define __field64(type, type64, name) type64 name
28 #elif __BYTE_ORDER == __LITTLE_ENDIAN
29 # define __field64(type, type64, name) \
30 type name __attribute__((__aligned__ (__alignof__ (type64)))); int __##name##_pad
32 # define __field64(type, type64, name) \
33 int __##name##_pad __attribute__((__aligned__ (__alignof__ (type64)))); type name
40 __field64(__fsblkcnt_t
, __fsblkcnt64_t
, f_blocks
);
41 __field64(__fsblkcnt_t
, __fsblkcnt64_t
, f_bfree
);
42 __field64(__fsblkcnt_t
, __fsblkcnt64_t
, f_bavail
);
43 __field64(__fsfilcnt_t
, __fsfilcnt64_t
, f_files
);
44 __field64(__fsfilcnt_t
, __fsfilcnt64_t
, f_ffree
);
46 __SWORD_TYPE f_namelen
;
47 __SWORD_TYPE f_frsize
;
49 __SWORD_TYPE f_spare
[4];
54 #ifdef __USE_LARGEFILE64
59 __fsblkcnt64_t f_blocks
;
60 __fsblkcnt64_t f_bfree
;
61 __fsblkcnt64_t f_bavail
;
62 __fsfilcnt64_t f_files
;
63 __fsfilcnt64_t f_ffree
;
65 __SWORD_TYPE f_namelen
;
66 __SWORD_TYPE f_frsize
;
68 __SWORD_TYPE f_spare
[4];
72 /* Tell code we have these members. */
73 #define _STATFS_F_NAMELEN
74 #define _STATFS_F_FRSIZE
75 #define _STATFS_F_FLAGS