mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
build: Fix quota tests, including move of sysquotas.c to the top level
This correctly detects quotas on FreeBSD Andrew Bartlett
This commit is contained in:
parent
931ed2509d
commit
006bdc0be0
@ -4617,7 +4617,7 @@ AC_TRY_RUN_STRICT([
|
|||||||
#define HAVE_QUOTACTL_4A 1
|
#define HAVE_QUOTACTL_4A 1
|
||||||
#define AUTOCONF_TEST 1
|
#define AUTOCONF_TEST 1
|
||||||
#include "confdefs.h"
|
#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)])
|
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
|
if test x"$samba_cv_HAVE_QUOTACTL_4A" = x"yes"; then
|
||||||
samba_cv_SYSQUOTA_FOUND=yes;
|
samba_cv_SYSQUOTA_FOUND=yes;
|
||||||
@ -4631,7 +4631,7 @@ AC_TRY_RUN_STRICT([
|
|||||||
#define HAVE_QUOTACTL_4B 1
|
#define HAVE_QUOTACTL_4B 1
|
||||||
#define AUTOCONF_TEST 1
|
#define AUTOCONF_TEST 1
|
||||||
#include "confdefs.h"
|
#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)])
|
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
|
if test x"$samba_cv_HAVE_QUOTACTL_4B" = x"yes"; then
|
||||||
samba_cv_SYSQUOTA_FOUND=yes;
|
samba_cv_SYSQUOTA_FOUND=yes;
|
||||||
|
@ -1238,23 +1238,24 @@ main() {
|
|||||||
if not conf.CHECK_CODE('''
|
if not conf.CHECK_CODE('''
|
||||||
#define HAVE_QUOTACTL_4A 1
|
#define HAVE_QUOTACTL_4A 1
|
||||||
#define AUTOCONF_TEST 1
|
#define AUTOCONF_TEST 1
|
||||||
#include "confdefs.h"
|
#include "../tests/sysquotas.c"
|
||||||
#include "${srcdir-.}/../tests/sysquotas.c"
|
|
||||||
''',
|
''',
|
||||||
|
cflags=conf.env['WERROR_CFLAGS'],
|
||||||
define='HAVE_QUOTACTL_4A',
|
define='HAVE_QUOTACTL_4A',
|
||||||
msg='for QUOTACTL_4A: long quotactl(int cmd, char *special, qid_t id, caddr_t addr)',
|
msg='for QUOTACTL_4A: long quotactl(int cmd, char *special, qid_t id, caddr_t addr)',
|
||||||
execute=True,
|
execute=True,
|
||||||
local_include=False):
|
addmain=False):
|
||||||
|
|
||||||
conf.CHECK_CODE('''
|
conf.CHECK_CODE('''
|
||||||
#define HAVE_QUOTACTL_4B 1
|
#define HAVE_QUOTACTL_4B 1
|
||||||
#define AUTOCONF_TEST 1
|
#define AUTOCONF_TEST 1
|
||||||
#include "confdefs.h"
|
#include "../tests/sysquotas.c"
|
||||||
#include "${srcdir-.}/../tests/sysquotas.c"
|
|
||||||
''',
|
''',
|
||||||
|
cflags=conf.env['WERROR_CFLAGS'],
|
||||||
define='HAVE_QUOTACTL_4B',
|
define='HAVE_QUOTACTL_4B',
|
||||||
msg='for QUOTACTL_4B: int quotactl(const char *path, int cmd, int id, char *addr)',
|
msg='for QUOTACTL_4B: int quotactl(const char *path, int cmd, int id, char *addr)',
|
||||||
execute=True,
|
execute=True,
|
||||||
local_include=False)
|
addmain=False)
|
||||||
|
|
||||||
conf.CHECK_CODE('''
|
conf.CHECK_CODE('''
|
||||||
clnt_create("", RQUOTAPROG, RQUOTAVERS, "udp");
|
clnt_create("", RQUOTAPROG, RQUOTAVERS, "udp");
|
||||||
|
@ -42,7 +42,7 @@ extern int quotactl(int cmd, const char *special, uid_t uid, void *addr);
|
|||||||
struct SYS_DQBLK D;
|
struct SYS_DQBLK D;
|
||||||
|
|
||||||
ret = quotactl(Q_GETQUOTA,"/dev/hda1",0,(void *)&D);
|
ret = quotactl(Q_GETQUOTA,"/dev/hda1",0,(void *)&D);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ extern int quotactl(int cmd, const char *special, uid_t uid, void *addr);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
autoconf_quota();
|
autoconf_quota();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user