15#if HAVE_F_FRSIZE_IN_STATFS
16#define STATFS_FRSIZE(x) (x).f_frsize
18#define STATFS_FRSIZE(x) (x).f_bsize
24#if !HAVE_STATFS && (_SQUID_MINGW_ || _SQUID_WINDOWS_)
26 DWORD spc, bps, freec, totalc;
27 DWORD vsn, maxlen, flags;
33 strncpy(drive, path, 2);
37 if (!GetDiskFreeSpace(drive, &spc, &bps, &freec, &totalc)) {
41 if (!GetVolumeInformation(drive,
nullptr, 0, &vsn, &maxlen, &flags,
nullptr, 0)) {
46 memset(sfs, 0,
sizeof(*sfs));
60 if (
int x = statfs(path, &tmpSfs))
63 memset(sfs, 0,
sizeof(*sfs));
73 sfs->
f_fsid = tmpSfs.f_fsid;
77#error Both statvfs() and statfs() system calls are missing.
int xstatvfs(const char *path, struct statvfs *sfs)