// D import file generated from '../../../../libphobos/libdruntime/core/sys/posix/sys/statvfs.d'
module core.sys.posix.sys.statvfs;
private import core.stdc.config;

private import core.sys.posix.config;

public import core.sys.posix.sys.types;

version (Posix)
{
	extern (C) 
	{
		version (linux)
		{
			static if(__WORDSIZE == 32)
			{
				version = _STATVFSBUF_F_UNUSED;
			}
			struct statvfs_t
			{
				c_ulong f_bsize;
				c_ulong f_frsize;
				fsblkcnt_t f_blocks;
				fsblkcnt_t f_bfree;
				fsblkcnt_t f_bavail;
				fsfilcnt_t f_files;
				fsfilcnt_t f_ffree;
				fsfilcnt_t f_favail;
				c_ulong f_fsid;
				version (_STATVFSBUF_F_UNUSED)
				{
					int __f_unused;
				}
				c_ulong f_flag;
				c_ulong f_namemax;
				int[6] __f_spare;
			}
			static if(__USE_GNU)
			{
				enum FFlag 
				{
					ST_RDONLY = 1,
					ST_NOSUID = 2,
					ST_NODEV = 4,
					ST_NOEXEC = 8,
					ST_SYNCHRONOUS = 16,
					ST_MANDLOCK = 64,
					ST_WRITE = 128,
					ST_APPEND = 256,
					ST_IMMUTABLE = 512,
					ST_NOATIME = 1024,
					ST_NODIRATIME = 2048,
					ST_RELATIME = 4096,
				}
			}
			else
			{
				enum FFlag 
				{
					ST_RDONLY = 1,
					ST_NOSUID = 2,
				}
			}
		}
		else
		{
			struct statvfs_t
			{
				c_ulong f_bsize;
				c_ulong f_frsize;
				fsblkcnt_t f_blocks;
				fsblkcnt_t f_bfree;
				fsblkcnt_t f_bavail;
				fsfilcnt_t f_files;
				fsfilcnt_t f_ffree;
				fsfilcnt_t f_favail;
				c_ulong f_fsid;
				c_ulong f_flag;
				c_ulong f_namemax;
			}
			enum FFlag 
			{
				ST_RDONLY = 1,
				ST_NOSUID = 2,
			}
		}
		static if(__USE_FILE_OFFSET64)
		{
			int statvfs64(const char* file, statvfs_t* buf);
			alias statvfs64 statvfs;
			int fstatvfs64(int fildes, statvfs_t* buf);
			alias fstatvfs64 fstatvfs;
		}
		else
		{
			int statvfs(const char* file, statvfs_t* buf);
			int fstatvfs(int fildes, statvfs_t* buf);
		}
	}
}
