diff options
author | joerg <joerg@pkgsrc.org> | 2006-12-01 13:36:59 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2006-12-01 13:36:59 +0000 |
commit | d7457ceaa4b80882423fc29918a86e6eec2246e9 (patch) | |
tree | 638f30dd1a9ef843a3f954f71497d669dd47f4a1 /mail/cyrus-imapd | |
parent | 9e9158a6965fb136fca7be1420e8cf20e9525f7b (diff) | |
download | pkgsrc-d7457ceaa4b80882423fc29918a86e6eec2246e9.tar.gz |
Replace use of timezone (on BSDs traditionally a function, not a
variable) with the portable equivalent. Bump revision.
Diffstat (limited to 'mail/cyrus-imapd')
-rw-r--r-- | mail/cyrus-imapd/Makefile | 4 | ||||
-rw-r--r-- | mail/cyrus-imapd/distinfo | 3 | ||||
-rw-r--r-- | mail/cyrus-imapd/patches/patch-aq | 39 |
3 files changed, 43 insertions, 3 deletions
diff --git a/mail/cyrus-imapd/Makefile b/mail/cyrus-imapd/Makefile index 7a8d536cba2..a903f02ca3c 100644 --- a/mail/cyrus-imapd/Makefile +++ b/mail/cyrus-imapd/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.68 2006/10/26 01:10:35 obache Exp $ +# $NetBSD: Makefile,v 1.69 2006/12/01 13:36:59 joerg Exp $ DISTNAME= cyrus-imapd-2.2.13 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= mail MASTER_SITES= ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/ \ ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/OLD-VERSIONS/imap/ diff --git a/mail/cyrus-imapd/distinfo b/mail/cyrus-imapd/distinfo index 627fbde29bc..2060d863b5f 100644 --- a/mail/cyrus-imapd/distinfo +++ b/mail/cyrus-imapd/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.25 2006/11/03 05:06:54 obache Exp $ +$NetBSD: distinfo,v 1.26 2006/12/01 13:36:59 joerg Exp $ SHA1 (cyrus-imapd-2.2.13.tar.gz) = ba84b67a1cae4c15d5a588d010764031167970c4 RMD160 (cyrus-imapd-2.2.13.tar.gz) = 7e8ac84b5ddd9f1206e71d5b659d07d8400f9ac2 @@ -12,6 +12,7 @@ SHA1 (patch-af) = 2aaf1be5fcb102b047a57fe0a908b3e8f95037ea SHA1 (patch-al) = 6fa8967eb97f7cfdb93de86a45aa90ab3a1bd129 SHA1 (patch-am) = 0804e6fa6694ed820861b740ac1bead29b3eeb4b SHA1 (patch-ap) = 95b987e83ddd53065f7ffe503d0f07694f9bcd6b +SHA1 (patch-aq) = 0d764585dc2af05964b03723c29ff127ebe3c25d SHA1 (patch-ba) = 98bea064fa4d97b0bb1ba2d1fcb4d30611ac706e SHA1 (patch-bb) = 8725d9008617acb392b904d76a353b8829fdfb33 SHA1 (patch-bc) = 3266d52067aef8f4835670cba1be6c190ff94f15 diff --git a/mail/cyrus-imapd/patches/patch-aq b/mail/cyrus-imapd/patches/patch-aq new file mode 100644 index 00000000000..efd5a002d73 --- /dev/null +++ b/mail/cyrus-imapd/patches/patch-aq @@ -0,0 +1,39 @@ +$NetBSD: patch-aq,v 1.3 2006/12/01 13:36:59 joerg Exp $ + +--- imap/fetchnews.c.orig 2005-03-23 00:40:11.000000000 +0000 ++++ imap/fetchnews.c +@@ -371,7 +371,8 @@ int main(int argc, char *argv[]) + prot_fgets(buf, sizeof(buf), pin); + + if (newnews) { +- struct tm ctime, *ptime; ++ struct tm ctime, ptime, ltime; ++ time_t l_time, l_gmt; + + /* fetch the server's current time */ + prot_printf(pout, "DATE\r\n"); +@@ -416,8 +417,11 @@ int main(int argc, char *argv[]) + + /* ask for new articles */ + if (stamp) stamp -= 180; /* adjust back 3 minutes */ +- ptime = gmtime(&stamp); +- strftime(buf, sizeof(buf), datefmt, ptime); ++ gmtime_r(&stamp, &ptime); ++ localtime_r(&stamp, <ime); ++ l_gmt = mktime(&ptime); ++ l_time = mktime(<ime);; ++ strftime(buf, sizeof(buf), datefmt, &ptime); + prot_printf(pout, "NEWNEWS %s %s GMT\r\n", wildmat, buf); + + if (!prot_fgets(buf, sizeof(buf), pin) || strncmp("230", buf, 3)) { +@@ -433,7 +437,9 @@ int main(int argc, char *argv[]) + We can't change this, otherwise we'd be incompatible + with an old localtime timestamp. + */ +- stamp -= timezone; ++ stamp += l_time - l_gmt; ++ if (ltime.tm_isdst) ++ stamp += 3600; + } + + if (!newnews) { |