c25356d5978632df6203437e1953bcb29e0c736fTimo Sirainen#ifndef QUOTA_FS_H
c25356d5978632df6203437e1953bcb29e0c736fTimo Sirainen#define QUOTA_FS_H
a35cbba04d0a2823da98e693bd09a051addffdb2Timo Sirainen
e101ed4afa1cfe5bb478491cbb5b8e7ff3de36ceTimo Sirainen#if defined (HAVE_STRUCT_DQBLK_CURBLOCKS) || \
e101ed4afa1cfe5bb478491cbb5b8e7ff3de36ceTimo Sirainen defined (HAVE_STRUCT_DQBLK_CURSPACE)
e101ed4afa1cfe5bb478491cbb5b8e7ff3de36ceTimo Sirainen# define HAVE_FS_QUOTA
e101ed4afa1cfe5bb478491cbb5b8e7ff3de36ceTimo Sirainen#endif
a35cbba04d0a2823da98e693bd09a051addffdb2Timo Sirainen
26ada766cfff6ebfb91d100936118cf8aa51e3aeTimo Sirainen#ifdef HAVE_QUOTA_OPEN
73ac4a4b176aacc175c47e0d8791b7e56bad1d52Timo Sirainen/* absolute path to avoid confusion with ./quota.h */
73ac4a4b176aacc175c47e0d8791b7e56bad1d52Timo Sirainen# include "/usr/include/quota.h" /* NetBSD with libquota */
26ada766cfff6ebfb91d100936118cf8aa51e3aeTimo Sirainen#endif
26ada766cfff6ebfb91d100936118cf8aa51e3aeTimo Sirainen
a35cbba04d0a2823da98e693bd09a051addffdb2Timo Sirainen#ifdef HAVE_SYS_QUOTA_H
45031ba153608eb33af22ee0d242c3e5e426486dTimo Sirainen# include <sys/quota.h> /* Linux, HP-UX */
a35cbba04d0a2823da98e693bd09a051addffdb2Timo Sirainen#elif defined(HAVE_SYS_FS_UFS_QUOTA_H)
a35cbba04d0a2823da98e693bd09a051addffdb2Timo Sirainen# include <sys/fs/ufs_quota.h> /* Solaris */
a35cbba04d0a2823da98e693bd09a051addffdb2Timo Sirainen#elif defined(HAVE_UFS_UFS_QUOTA_H)
a35cbba04d0a2823da98e693bd09a051addffdb2Timo Sirainen# include <ufs/ufs/quota.h> /* BSDs */
cd7509b3bc49c8cefcb8df091888bd3549ac00a3Timo Sirainen#elif defined(HAVE_JFS_QUOTA_H)
cd7509b3bc49c8cefcb8df091888bd3549ac00a3Timo Sirainen# include <jfs/quota.h> /* AIX */
83e4ca4e480fd4bd2865f1afbbe930c4b101b9f3Timo Sirainen# ifdef HAVE_SYS_FS_QUOTA_COMMON_H
83e4ca4e480fd4bd2865f1afbbe930c4b101b9f3Timo Sirainen# include <sys/fs/quota_common.h> /* quotactl() */
83e4ca4e480fd4bd2865f1afbbe930c4b101b9f3Timo Sirainen# endif
a35cbba04d0a2823da98e693bd09a051addffdb2Timo Sirainen#else
a35cbba04d0a2823da98e693bd09a051addffdb2Timo Sirainen# undef HAVE_FS_QUOTA
a35cbba04d0a2823da98e693bd09a051addffdb2Timo Sirainen#endif
a35cbba04d0a2823da98e693bd09a051addffdb2Timo Sirainen
45031ba153608eb33af22ee0d242c3e5e426486dTimo Sirainen#ifdef HAVE_QUOTACTL
45031ba153608eb33af22ee0d242c3e5e426486dTimo Sirainen# ifdef HAVE_SYS_QUOTA_H
1dc16982b69b32bc8506934c9c3a8191becf19a9Timo Sirainen# ifndef _HPUX_SOURCE
45031ba153608eb33af22ee0d242c3e5e426486dTimo Sirainen# define FS_QUOTA_LINUX
45031ba153608eb33af22ee0d242c3e5e426486dTimo Sirainen# else
45031ba153608eb33af22ee0d242c3e5e426486dTimo Sirainen# define FS_QUOTA_HPUX
45031ba153608eb33af22ee0d242c3e5e426486dTimo Sirainen# endif
45031ba153608eb33af22ee0d242c3e5e426486dTimo Sirainen# else
45031ba153608eb33af22ee0d242c3e5e426486dTimo Sirainen# define FS_QUOTA_BSDAIX
45031ba153608eb33af22ee0d242c3e5e426486dTimo Sirainen# endif
29fe652c01b24298ee9e5825a103279106f0e263Timo Sirainen#elif defined (HAVE_Q_QUOTACTL)
29fe652c01b24298ee9e5825a103279106f0e263Timo Sirainen# define FS_QUOTA_SOLARIS
29fe652c01b24298ee9e5825a103279106f0e263Timo Sirainen#else
ac756824dc2be28eda7e9f70f1a694469f88d8bfTimo Sirainen# undef HAVE_FS_QUOTA
ac756824dc2be28eda7e9f70f1a694469f88d8bfTimo Sirainen#endif
ac756824dc2be28eda7e9f70f1a694469f88d8bfTimo Sirainen
26ada766cfff6ebfb91d100936118cf8aa51e3aeTimo Sirainen#ifdef HAVE_QUOTA_OPEN /* NetBSD with libquota */
26ada766cfff6ebfb91d100936118cf8aa51e3aeTimo Sirainen# define FS_QUOTA_NETBSD
26ada766cfff6ebfb91d100936118cf8aa51e3aeTimo Sirainen# define HAVE_FS_QUOTA
26ada766cfff6ebfb91d100936118cf8aa51e3aeTimo Sirainen# undef FS_QUOTA_LINUX /* obtained because we also have <sys/quota.h> */
26ada766cfff6ebfb91d100936118cf8aa51e3aeTimo Sirainen#endif
26ada766cfff6ebfb91d100936118cf8aa51e3aeTimo Sirainen
a35cbba04d0a2823da98e693bd09a051addffdb2Timo Sirainen#endif