[dovecot-cvs] dovecot/src/plugins/quota quota-fs.c, 1.14.2.6, 1.14.2.7 quota-fs.h, 1.6.2.1, 1.6.2.2

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


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

Modified Files:
      Tag: branch_1_0
	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.14.2.6
retrieving revision 1.14.2.7
diff -u -d -r1.14.2.6 -r1.14.2.7
--- quota-fs.c	6 Aug 2006 22:22:18 -0000	1.14.2.6
+++ quota-fs.c	10 Aug 2006 17:45:43 -0000	1.14.2.7
@@ -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
@@ -230,11 +234,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.6.2.1
retrieving revision 1.6.2.2
diff -u -d -r1.6.2.1 -r1.6.2.2
--- quota-fs.h	2 Aug 2006 22:39:24 -0000	1.6.2.1
+++ quota-fs.h	10 Aug 2006 17:45:43 -0000	1.6.2.2
@@ -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