[dovecot-cvs] dovecot/src/plugins/quota quota-fs.c, 1.22, 1.23 quota-fs.h, 1.7, 1.8

cras at dovecot.org cras at dovecot.org
Thu Aug 10 20:46:10 EEST 2006


Update of /var/lib/cvs/dovecot/src/plugins/quota
In directory talvi:/tmp/cvs-serv12689/src/plugins/quota

Modified Files:
	quota-fs.c quota-fs.h 
Log Message:
Put back specific checks for struct dqblk.dqb_curblocks vs curspace. The
removal broke compiling for some OSes such as OSX.



Index: quota-fs.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/quota/quota-fs.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- quota-fs.c	6 Aug 2006 22:22:22 -0000	1.22
+++ quota-fs.c	10 Aug 2006 17:46:08 -0000	1.23
@@ -24,6 +24,10 @@
 #  define DEV_BSIZE 512
 #endif
 
+#ifdef HAVE_STRUCT_DQBLK_CURSPACE
+#  define dqb_curblocks dqb_curspace
+#endif
+
 /* Older sys/quota.h doesn't define _LINUX_QUOTA_VERSION at all, which means
    it supports only v1 quota */
 #ifndef _LINUX_QUOTA_VERSION
@@ -233,11 +237,7 @@
 			return -1;
 		}
 
-#if _LINUX_QUOTA_VERSION < 2
 		*value_r = dqblk.dqb_curblocks / 1024;
-#else
-		*value_r = dqblk.dqb_curspace / 1024;
-#endif
 		*limit_r = dqblk.dqb_bsoftlimit;
 	}
 #elif defined(HAVE_QUOTACTL)

Index: quota-fs.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/quota/quota-fs.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- quota-fs.h	2 Aug 2006 22:39:50 -0000	1.7
+++ quota-fs.h	10 Aug 2006 17:46:08 -0000	1.8
@@ -1,7 +1,10 @@
 #ifndef __QUOTA_FS_H
 #define __QUOTA_FS_H
 
-#define HAVE_FS_QUOTA
+#if defined (HAVE_STRUCT_DQBLK_CURBLOCKS) || \
+	defined (HAVE_STRUCT_DQBLK_CURSPACE)
+#  define HAVE_FS_QUOTA
+#endif
 
 #ifdef HAVE_SYS_QUOTA_H
 #  include <sys/quota.h> /* Linux */



More information about the dovecot-cvs mailing list