summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorhe <he@pkgsrc.org>2022-10-29 14:44:07 +0000
committerhe <he@pkgsrc.org>2022-10-29 14:44:07 +0000
commit61370cbead04458b014ad53f450adba917d50dd6 (patch)
treecb1b03453884d9a859756c29d4a195ea0966edc5 /mail
parent7910838142d742cf6862060326addb29fa1ba9cc (diff)
downloadpkgsrc-61370cbead04458b014ad53f450adba917d50dd6.tar.gz
mail/cyrus-imapd24: fix issue related to own assert() definition.
The C standard says assert() must be a void expression, so change the definition from being a block to an expression, loosely patterned after our <assert.h> header. This makes it compatible with the various perl headers this program uses. Also, add a missing semicolon in a sequence of assert() uses, as this error was now exposed. Bump PKGREVISION.
Diffstat (limited to 'mail')
-rw-r--r--mail/cyrus-imapd24/Makefile4
-rw-r--r--mail/cyrus-imapd24/distinfo5
-rw-r--r--mail/cyrus-imapd24/patches/patch-imap_mailbox.c14
-rw-r--r--mail/cyrus-imapd24/patches/patch-lib_assert.h19
4 files changed, 36 insertions, 6 deletions
diff --git a/mail/cyrus-imapd24/Makefile b/mail/cyrus-imapd24/Makefile
index b489e92cd77..6c14d99492d 100644
--- a/mail/cyrus-imapd24/Makefile
+++ b/mail/cyrus-imapd24/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.77 2022/06/28 11:34:19 wiz Exp $
+# $NetBSD: Makefile,v 1.78 2022/10/29 14:44:07 he Exp $
DISTNAME= cyrus-imapd-2.4.20
-PKGREVISION= 20
+PKGREVISION= 21
CATEGORIES= mail
MASTER_SITES= http://cyrusimap.org/releases/
MASTER_SITES+= https://www.cyrusimap.org/releases/old/
diff --git a/mail/cyrus-imapd24/distinfo b/mail/cyrus-imapd24/distinfo
index 05c7fbb0584..0b100d67082 100644
--- a/mail/cyrus-imapd24/distinfo
+++ b/mail/cyrus-imapd24/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.29 2022/05/29 19:53:59 gavan Exp $
+$NetBSD: distinfo,v 1.30 2022/10/29 14:44:07 he Exp $
BLAKE2s (cyrus-imapd-2.4.20.tar.gz) = fca8c0a2a00abc61bd61c0b563b36403c843fa0f25e35432692394531da8b158
SHA512 (cyrus-imapd-2.4.20.tar.gz) = a1e7d8b4bc096c57ba36f74f2853eb520503b40beffc80912a0c081bce1df3fa8cd41b00c789d33097be6325563743c9540c11cc6137c51a747880749d2f5b4d
@@ -11,9 +11,10 @@ SHA1 (patch-ao) = c01c9d32b4d73cbc32d2ad8bfca8b8b021ca2474
SHA1 (patch-aq) = 101f5d253dae303f187e15eca28aa687f846ba6b
SHA1 (patch-configure) = 2b4ea2203f446175fedfe2549534f382e4115579
SHA1 (patch-imap_idlemsg.c) = 112e8077e1f820d526db342f425dab3ba15e71f2
-SHA1 (patch-imap_mailbox.c) = 9a000763a153863f6c40f8939fe19eab41973cea
+SHA1 (patch-imap_mailbox.c) = 53cab0f89e2d64424871d214f7cdd4213388dcfb
SHA1 (patch-imtest_Makefile.in) = c76d63144a30ea28af12474376451c9e3288be2b
SHA1 (patch-lib_Makefile.in) = a337c7dc7c22a25d029c4b4d8c7c8b5650bff8f2
+SHA1 (patch-lib_assert.h) = 027a9f6c20ceffee0651dc38f1666d5a307e1ce4
SHA1 (patch-master_Makefile.in) = ec274fab36541e2c03572e72c6ff8e05f24756ef
SHA1 (patch-notifyd_Makefile.in) = e66b93338f8fc1713be3ff14ba1edad005cb428b
SHA1 (patch-perl_sieve_lib_Makefile.in) = a2b9ee49c0d01262d04175498122cbf14d92cc6f
diff --git a/mail/cyrus-imapd24/patches/patch-imap_mailbox.c b/mail/cyrus-imapd24/patches/patch-imap_mailbox.c
index 0180a3ff164..7c5777051f9 100644
--- a/mail/cyrus-imapd24/patches/patch-imap_mailbox.c
+++ b/mail/cyrus-imapd24/patches/patch-imap_mailbox.c
@@ -1,11 +1,12 @@
-$NetBSD: patch-imap_mailbox.c,v 1.3 2014/06/17 01:08:59 obache Exp $
+$NetBSD: patch-imap_mailbox.c,v 1.4 2022/10/29 14:44:07 he Exp $
* cast to unsigned long for platform sizeof(time_t) > sizeof(unsigned long).
https://bugzilla.cyrusimap.org/show_bug.cgi?id=3376
+* Fix an issue related to use of the assert() macro (statement or block?)
--- imap/mailbox.c.orig 2012-12-01 19:57:54.000000000 +0000
+++ imap/mailbox.c
-@@ -1960,10 +1960,10 @@ bit32 make_sync_crc(struct mailbox *mail
+@@ -1961,10 +1961,10 @@ bit32 make_sync_crc(struct mailbox *mail
flagcrc ^= crc32_cstring(buf);
}
@@ -19,3 +20,12 @@ $NetBSD: patch-imap_mailbox.c,v 1.3 2014/06/17 01:08:59 obache Exp $
message_guid_encode(&record->guid));
return crc32_cstring(buf);
+@@ -2179,7 +2179,7 @@ int mailbox_append_index_record(struct m
+ assert(mailbox_index_islocked(mailbox, 1));
+
+ /* Append MUST be a higher UID than any we've yet seen */
+- assert(record->uid > mailbox->i.last_uid)
++ assert(record->uid > mailbox->i.last_uid);
+
+ /* Append MUST have a message with data */
+ assert(record->size);
diff --git a/mail/cyrus-imapd24/patches/patch-lib_assert.h b/mail/cyrus-imapd24/patches/patch-lib_assert.h
new file mode 100644
index 00000000000..16c6880ae43
--- /dev/null
+++ b/mail/cyrus-imapd24/patches/patch-lib_assert.h
@@ -0,0 +1,19 @@
+$NetBSD: patch-lib_assert.h,v 1.1 2022/10/29 14:44:07 he Exp $
+
+Fix assert() macro to be usable as an expression.
+
+--- lib/assert.h.orig 2017-08-18 00:29:14.000000000 +0000
++++ lib/assert.h
+@@ -46,10 +46,10 @@
+ #define INCLUDED_ASSERT_H
+
+ #ifdef __STDC__
+-#define assert(ex) {if (!(ex))assertionfailed(__FILE__, __LINE__, #ex);}
++#define assert(ex) ((ex) ? (void)0 : assertionfailed(__FILE__, __LINE__, #ex))
+ void assertionfailed(const char *file, int line, const char *expr);
+ #else
+-#define assert(ex) {if (!(ex))assertionfailed(__FILE__, __LINE__, (char*)0);}
++#define assert(ex) ((ex) ? (void)0 : assertionfailed(__FILE__, __LINE__, (char*)0))
+ #endif
+
+ #endif /* INCLUDED_ASSERT_H */