summaryrefslogtreecommitdiff
path: root/source3/tests
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-09-29 14:28:57 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-09-29 14:50:00 +1000
commit006bdc0be0bf2ef70b3eb24d679bd49f6d8079fd (patch)
treed6f217749a26f93a805afefa1e2b9235a6437d01 /source3/tests
parent931ed2509d93110b525f763ffb15ee3feff87fa0 (diff)
downloadsamba-006bdc0be0bf2ef70b3eb24d679bd49f6d8079fd.tar.gz
samba-006bdc0be0bf2ef70b3eb24d679bd49f6d8079fd.tar.bz2
samba-006bdc0be0bf2ef70b3eb24d679bd49f6d8079fd.zip
build: Fix quota tests, including move of sysquotas.c to the top level
This correctly detects quotas on FreeBSD Andrew Bartlett
Diffstat (limited to 'source3/tests')
-rw-r--r--source3/tests/sysquotas.c90
1 files changed, 0 insertions, 90 deletions
diff --git a/source3/tests/sysquotas.c b/source3/tests/sysquotas.c
deleted file mode 100644
index 1544dca7cf..0000000000
--- a/source3/tests/sysquotas.c
+++ /dev/null
@@ -1,90 +0,0 @@
-/* this test should find out what quota api is available on the os */
-
- int autoconf_quota(void);
-
-#if defined(HAVE_QUOTACTL_4A)
-/* long quotactl(int cmd, char *special, qid_t id, caddr_t addr) */
-
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-#ifdef HAVE_ASM_TYPES_H
-#include <asm/types.h>
-#endif
-
-#if defined(HAVE_LINUX_QUOTA_H)
-# include <linux/quota.h>
-# if defined(HAVE_STRUCT_IF_DQBLK)
-# define SYS_DQBLK if_dqblk
-# elif defined(HAVE_STRUCT_MEM_DQBLK)
-# define SYS_DQBLK mem_dqblk
-# endif
-#elif defined(HAVE_SYS_QUOTA_H)
-# include <sys/quota.h>
-#endif
-
-#ifdef HPUX
-/* HPUX has no prototype for quotactl but we test compile with strict
- error checks, which would fail without function prototype */
-extern int quotactl(int cmd, const char *special, uid_t uid, void *addr);
-#endif
-
-#ifndef SYS_DQBLK
-#define SYS_DQBLK dqblk
-#endif
-
- int autoconf_quota(void);
-
- int autoconf_quota(void)
-{
- int ret = -1;
- struct SYS_DQBLK D;
-
- ret = quotactl(Q_GETQUOTA,"/dev/hda1",0,(void *)&D);
-
- return ret;
-}
-
-#elif defined(HAVE_QUOTACTL_4B)
-/* int quotactl(const char *path, int cmd, int id, char *addr); */
-
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-#ifdef HAVE_SYS_QUOTA_H
-#include <sys/quota.h>
-#else /* *BSD */
-#include <sys/types.h>
-#ifdef HAVE_UFS_UFS_QUOTA_H
-#include <ufs/ufs/quota.h>
-#endif
-#include <machine/param.h>
-#endif
-
- int autoconf_quota(void)
-{
- int ret = -1;
- struct dqblk D;
-
- ret = quotactl("/",Q_GETQUOTA,0,(char *) &D);
-
- return ret;
-}
-
-#elif defined(HAVE_QUOTACTL_2)
-
-#error HAVE_QUOTACTL_2 not implemented
-
-#else
-
-#error Unknow QUOTACTL prototype
-
-#endif
-
- int main(void)
-{
- autoconf_quota();
- return 0;
-}