[SVN] r476 - /branches/cvsmerge/cyrus-cvs/imap/annotate.c

debian at incase.de debian at incase.de
Sun Jun 4 20:06:53 UTC 2006


Author: sven
Date: Sun Jun  4 22:06:52 2006
New Revision: 476

URL: https://mail.incase.de/viewcvs?rev=476&root=cyrus22&view=rev
Log:
Allow reporting of mailbox sizes above 4GB

Modified:
    branches/cvsmerge/cyrus-cvs/imap/annotate.c

Modified: branches/cvsmerge/cyrus-cvs/imap/annotate.c
URL: https://mail.incase.de/viewcvs/branches/cvsmerge/cyrus-cvs/imap/annotate.c?rev=476&root=cyrus22&r1=475&r2=476&view=diff
==============================================================================
--- branches/cvsmerge/cyrus-cvs/imap/annotate.c (original)
+++ branches/cvsmerge/cyrus-cvs/imap/annotate.c Sun Jun  4 22:06:52 2006
@@ -40,7 +40,7 @@
  *
  */
 /*
- * $Id: annotate.c,v 1.32 2005/10/31 17:08:59 ken3 Exp $
+ * $Id: annotate.c,v 1.33 2006/06/01 13:26:07 murch Exp $
  */
 
 #include <config.h>
@@ -703,7 +703,13 @@
     struct mailbox mailbox;
     struct index_record record;
     int r = 0, msg;
+#ifdef HAVE_LONG_LONG_INT
+    unsigned long long totsize = 0;
+# define SIZE_FMT "%llu"
+#else
     unsigned long totsize = 0;
+# define SIZE_FMT "%lu"
+#endif
     char value[21];
     struct annotation_data attrib;
 
@@ -735,7 +741,7 @@
 
     mailbox_close(&mailbox);
 
-    if (r || snprintf(value, sizeof(value), "%lu", totsize) == -1)
+    if (r || snprintf(value, sizeof(value), SIZE_FMT, totsize) == -1)
 	return;
 
     memset(&attrib, 0, sizeof(attrib));



More information about the Pkg-Cyrus-imapd-Debian-devel mailing list