pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mail/cyrus-imapd Replace use of timezone (on BSDs trad...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f3393d970723
branches:  trunk
changeset: 522048:f3393d970723
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Fri Dec 01 13:36:59 2006 +0000

description:
Replace use of timezone (on BSDs traditionally a function, not a
variable) with the portable equivalent. Bump revision.

diffstat:

 mail/cyrus-imapd/Makefile         |   4 ++--
 mail/cyrus-imapd/distinfo         |   3 ++-
 mail/cyrus-imapd/patches/patch-aq |  39 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 43 insertions(+), 3 deletions(-)

diffs (73 lines):

diff -r 0ef403a6b2ce -r f3393d970723 mail/cyrus-imapd/Makefile
--- a/mail/cyrus-imapd/Makefile Fri Dec 01 13:05:53 2006 +0000
+++ b/mail/cyrus-imapd/Makefile Fri Dec 01 13:36:59 2006 +0000
@@ -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 -r 0ef403a6b2ce -r f3393d970723 mail/cyrus-imapd/distinfo
--- a/mail/cyrus-imapd/distinfo Fri Dec 01 13:05:53 2006 +0000
+++ b/mail/cyrus-imapd/distinfo Fri Dec 01 13:36:59 2006 +0000
@@ -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-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 -r 0ef403a6b2ce -r f3393d970723 mail/cyrus-imapd/patches/patch-aq
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/cyrus-imapd/patches/patch-aq Fri Dec 01 13:36:59 2006 +0000
@@ -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, &ltime);
++      l_gmt = mktime(&ptime);
++      l_time = mktime(&ltime);;
++      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) {



Home | Main Index | Thread Index | Old Index