]>
git.ipfire.org Git - thirdparty/squid.git/blob - compat/statvfs.h
2 * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
9 #ifndef _SQUID_COMPAT_XSTATVFS_H
10 #define _SQUID_COMPAT_XSTATVFS_H
12 #if HAVE_SYS_STATVFS_H && HAVE_STATVFS
13 #include <sys/statvfs.h>
16 /* Windows and Linux use sys/vfs.h */
21 /* BSD and old Linux use sys/statfs.h */
24 #include <sys/statfs.h>
26 /* statfs() needs <sys/param.h> and <sys/mount.h> on BSD systems */
28 #include <sys/param.h>
31 #include <sys/mount.h>
33 #endif /* !HAVE_STATVFS */
36 #define xstatvfs statvfs
40 typedef unsigned long fsblkcnt_t
;
41 typedef unsigned long fsfilcnt_t
;
44 unsigned long f_bsize
; /* file system block size */
45 unsigned long f_frsize
; /* fragment size */
46 fsblkcnt_t f_blocks
; /* size of fs in f_frsize units */
47 fsblkcnt_t f_bfree
; /* # free blocks */
48 fsblkcnt_t f_bavail
; /* # free blocks for unprivileged users */
49 fsfilcnt_t f_files
; /* # inodes */
50 fsfilcnt_t f_ffree
; /* # free inodes */
51 fsfilcnt_t f_favail
; /* # free inodes for unprivileged users */
52 unsigned long f_fsid
; /* file system ID */
53 unsigned long f_flag
; /* mount flags */
54 unsigned long f_namemax
; /* maximum filename length */
57 #if defined(__cplusplus)
60 int xstatvfs(const char *path
, struct statvfs
*buf
);
64 #endif /* _SQUID_COMPAT_XSTATVFS_H */