2005-08-03  Roland McGrath  <roland@redhat.com>

	* configure.ac: Check for struct dqblk.dqb_curblocks field.
	* resource.c [LINUX] (OLD_CMD): New macro.
	(quotacmds): Use it to hard-wire old O_* values, don't use macros.
	(sys_quotactl): If dqb_curblocks is not there, it's called
	dqb_curspace instead.  Print dqb_* fields as unsigned long long.
diff --git a/configure.ac b/configure.ac
index 572adfd..405a6cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -216,6 +216,8 @@
 
 AC_CHECK_TYPES([struct user_desc],,, [#include <asm/ldt.h>])
 
+AC_CHECK_MEMBERS([struct dqblk.dqb_curblocks],,, [#include <sys/quota.h>])
+
 AC_CHECK_DECLS([sys_errlist])
 AC_CHECK_DECLS([sys_siglist, _sys_siglist],,, [#include <signal.h>])