On Mon, 10 Apr 2006, Antoine Jacoutot wrote:
I'm answering to myself... please wait before committing this, the cyrus devs
are working on a more portable version of this code. I'm currently testing it
and will post an update soon.

Hi.

Here you go. This patch was taken directly from cyrus-imapd CVS and should be good.
Please test, comment and commit.

Thanks!

--
Antoine Jacoutot
Observatoire de Paris
SIO - Centre de calcul (Bat 15)
5, Place Jules Janssen
92195 Meudon Cedex
Tel : +33 (0)1.45.07.71.95
diff -uNr --exclude=CVS /usr/ports/mail/cyrus-imapd/Makefile 
cyrus-imapd/Makefile
--- /usr/ports/mail/cyrus-imapd/Makefile        Sun Apr  9 01:48:33 2006
+++ cyrus-imapd/Makefile        Mon Apr 10 09:47:15 2006
@@ -5,6 +5,7 @@
 
 V=             2.2.13
 DISTNAME=      cyrus-imapd-${V}
+PKGNAME=       ${DISTNAME}p0
 FULLPKGNAME-perl=cyrus-imapd-perl-${V}
 CATEGORIES=    mail
 HOMEPAGE=      http://cyrusimap.web.cmu.edu
diff -uNr --exclude=CVS 
/usr/ports/mail/cyrus-imapd/patches/patch-imap_fetchnews_c 
cyrus-imapd/patches/patch-imap_fetchnews_c
--- /usr/ports/mail/cyrus-imapd/patches/patch-imap_fetchnews_c  Sat Apr  8 
22:46:20 2006
+++ cyrus-imapd/patches/patch-imap_fetchnews_c  Mon Apr 10 19:20:40 2006
@@ -1,12 +1,36 @@
-$OpenBSD: patch-imap_fetchnews_c,v 1.1 2006/04/08 20:46:20 sturm Exp $
---- imap/fetchnews.c.orig      Tue Apr  4 09:21:43 2006
-+++ imap/fetchnews.c   Tue Apr  4 09:21:59 2006
-@@ -433,7 +433,7 @@ int main(int argc, char *argv[])
+$OpenBSD$
+--- imap/fetchnews.c.orig      Wed Mar 23 01:40:11 2005
++++ imap/fetchnews.c   Mon Apr 10 19:20:13 2006
+@@ -60,6 +60,7 @@
+ #include "cyrusdb.h"
+ #include "exitcodes.h"
+ #include "global.h"
++#include "gmtoff.h"
+ #include "lock.h"
+ #include "prot.h"
+ #include "xmalloc.h"
+@@ -388,6 +389,7 @@ int main(int argc, char *argv[])
+              &ctime.tm_hour, &ctime.tm_min, &ctime.tm_sec);
+       ctime.tm_year -= 1900;
+       ctime.tm_mon--;
++      ctime.tm_isdst = -1;
+ 
+       /* read the previous timestamp */
+       if (!sfile[0]) {
+@@ -417,6 +419,7 @@ int main(int argc, char *argv[])
+       /* ask for new articles */
+       if (stamp) stamp -= 180; /* adjust back 3 minutes */
+       ptime = gmtime(&stamp);
++      ptime->tm_isdst = -1;
+       strftime(buf, sizeof(buf), datefmt, ptime);
+       prot_printf(pout, "NEWNEWS %s %s GMT\r\n", wildmat, buf);
+       
+@@ -433,7 +436,7 @@ int main(int argc, char *argv[])
           We can't change this, otherwise we'd be incompatible
           with an old localtime timestamp.
        */
 -      stamp -= timezone;
-+      stamp -= (time_t) timezone;
++      stamp += gmtoff_of(&ctime, stamp);
      }
  
      if (!newnews) {

Reply via email to