summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/configure.in4
-rw-r--r--source3/tests/sysquotas.c90
-rw-r--r--source3/wscript13
3 files changed, 9 insertions, 98 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 5045742cd4..d47f08a4a7 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -4617,7 +4617,7 @@ AC_TRY_RUN_STRICT([
#define HAVE_QUOTACTL_4A 1
#define AUTOCONF_TEST 1
#include "confdefs.h"
-#include "${srcdir-.}/../tests/sysquotas.c"],[$CFLAGS $Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS],
+#include "${srcdir-.}/../../tests/sysquotas.c"],[$CFLAGS $Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS],
samba_cv_HAVE_QUOTACTL_4A=yes,samba_cv_HAVE_QUOTACTL_4A=no,samba_cv_HAVE_QUOTACTL_4A=cross)])
if test x"$samba_cv_HAVE_QUOTACTL_4A" = x"yes"; then
samba_cv_SYSQUOTA_FOUND=yes;
@@ -4631,7 +4631,7 @@ AC_TRY_RUN_STRICT([
#define HAVE_QUOTACTL_4B 1
#define AUTOCONF_TEST 1
#include "confdefs.h"
-#include "${srcdir-.}/../tests/sysquotas.c"],[$CFLAGS $Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS],
+#include "${srcdir-.}/../../tests/sysquotas.c"],[$CFLAGS $Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS],
samba_cv_HAVE_QUOTACTL_4B=yes,samba_cv_HAVE_QUOTACTL_4B=no,samba_cv_HAVE_QUOTACTL_4B=cross)])
if test x"$samba_cv_HAVE_QUOTACTL_4B" = x"yes"; then
samba_cv_SYSQUOTA_FOUND=yes;
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;
-}
diff --git a/source3/wscript b/source3/wscript
index 3815c7ccdb..336b277a56 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -1238,23 +1238,24 @@ main() {
if not conf.CHECK_CODE('''
#define HAVE_QUOTACTL_4A 1
#define AUTOCONF_TEST 1
- #include "confdefs.h"
- #include "${srcdir-.}/../tests/sysquotas.c"
+ #include "../tests/sysquotas.c"
''',
+ cflags=conf.env['WERROR_CFLAGS'],
define='HAVE_QUOTACTL_4A',
msg='for QUOTACTL_4A: long quotactl(int cmd, char *special, qid_t id, caddr_t addr)',
execute=True,
- local_include=False):
+ addmain=False):
+
conf.CHECK_CODE('''
#define HAVE_QUOTACTL_4B 1
#define AUTOCONF_TEST 1
- #include "confdefs.h"
- #include "${srcdir-.}/../tests/sysquotas.c"
+ #include "../tests/sysquotas.c"
''',
+ cflags=conf.env['WERROR_CFLAGS'],
define='HAVE_QUOTACTL_4B',
msg='for QUOTACTL_4B: int quotactl(const char *path, int cmd, int id, char *addr)',
execute=True,
- local_include=False)
+ addmain=False)
conf.CHECK_CODE('''
clnt_create("", RQUOTAPROG, RQUOTAVERS, "udp");