pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mail Allow this code to compile with an older version ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/da27119bfe02
branches:  trunk
changeset: 532982:da27119bfe02
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Thu Sep 06 04:05:39 2007 +0000

description:
Allow this code to compile with an older version of GCC and on an older
version of FreeBSD.

diffstat:

 mail/courier-mta/distinfo         |   9 ++++--
 mail/courier-mta/patches/patch-an |  55 +++++++++++++++++++++++++++++++++++---
 mail/courier-mta/patches/patch-aq |  18 +++++++++--
 mail/courier-mta/patches/patch-as |  21 ++++++++++++++
 mail/courier-mta/patches/patch-at |  22 +++++++++++++++
 mail/courier-mta/patches/patch-au |  38 ++++++++++++++++++++++++++
 mail/sqwebmail/distinfo           |   4 ++-
 mail/sqwebmail/patches/patch-ak   |  22 +++++++++++++++
 mail/sqwebmail/patches/patch-an   |  38 ++++++++++++++++++++++++++
 9 files changed, 214 insertions(+), 13 deletions(-)

diffs (truncated from 312 to 300 lines):

diff -r e6c602b9ae76 -r da27119bfe02 mail/courier-mta/distinfo
--- a/mail/courier-mta/distinfo Thu Sep 06 01:12:33 2007 +0000
+++ b/mail/courier-mta/distinfo Thu Sep 06 04:05:39 2007 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.5 2007/09/05 19:21:03 jlam Exp $
+$NetBSD: distinfo,v 1.6 2007/09/06 04:05:39 jlam Exp $
 
 SHA1 (courier-0.56.0.tar.bz2) = 536f24db9f33f8d93445c03dd4edb50c7ec2f6b2
 RMD160 (courier-0.56.0.tar.bz2) = ce8e2d99f5b7baf500d748c18fbd126df8331398
@@ -14,8 +14,11 @@
 SHA1 (patch-aj) = 0ec994bfb79ca133555a3d300f8a264648591e1b
 SHA1 (patch-al) = 8c37ddbb5e3c358ee0920adc27441e38b4efa143
 SHA1 (patch-am) = edab962fa9bf8979e6fc9d319f95840178c3a578
-SHA1 (patch-an) = 1afb599c8f5289dda9f060f0aa97f7e0ef49e776
+SHA1 (patch-an) = f56cf08104e7006864fa0e8ce86dcf0e5dd66279
 SHA1 (patch-ao) = c859c61370fbc4a774456b629fb3f05ee1a32621
 SHA1 (patch-ap) = 8696818dc2994f8dbe523034ed1c713101693291
-SHA1 (patch-aq) = 26b3c6ed014673af035f7d38e479e318fc447157
+SHA1 (patch-aq) = 054df1e1e05df3e14b3c531c5bd9768b9d2e34d7
 SHA1 (patch-ar) = ab2c3e40928933eced0856a7c378c908e8a4689d
+SHA1 (patch-as) = 08bd540d92a3ef9db533a92b48c653ed2a256f9b
+SHA1 (patch-at) = 7c93cabfe5b1164c6699111cd74e612af887881c
+SHA1 (patch-au) = 794fdd49f7994689e4e4ee809293d2e67d9bc4c2
diff -r e6c602b9ae76 -r da27119bfe02 mail/courier-mta/patches/patch-an
--- a/mail/courier-mta/patches/patch-an Thu Sep 06 01:12:33 2007 +0000
+++ b/mail/courier-mta/patches/patch-an Thu Sep 06 04:05:39 2007 +0000
@@ -1,8 +1,53 @@
-$NetBSD: patch-an,v 1.1 2007/08/10 17:57:05 jlam Exp $
+$NetBSD: patch-an,v 1.2 2007/09/06 04:05:40 jlam Exp $
 
---- courier/webmlmd.C.orig     2007-06-15 22:21:24.000000000 -0400
+--- courier/webmlmd.C.orig     Sat Jun 16 02:21:24 2007
 +++ courier/webmlmd.C
-@@ -953,10 +953,10 @@ static void sendsubunsub(std::string ext
+@@ -22,6 +22,7 @@
+ #include      <string.h>
+ #include      <signal.h>
+ 
++#include      <sys/param.h>
+ #include      <sys/types.h>
+ #include      <sys/stat.h>
+ #include        <sys/socket.h>
+@@ -39,6 +40,12 @@
+ #include      <iostream>
+ #include      <fstream>
+ #include      <sstream>
++#if defined(__FreeBSD_version) && (__FreeBSD_version < 500029)
++#include      <cwchar>
++namespace std {
++      typedef basic_string <wchar_t> wstring;
++}
++#endif
+ #include      <map>
+ 
+ #include      "cmlm.h"
+@@ -606,7 +613,10 @@ HANDLER("ADMINUPDATE", do_admin_update)
+       cmdset(args_array, false);
+ 
+       {
+-              std::istringstream i(std::string(cgi("optheaderadd")) + "\n");
++              std::string t(cgi("optheaderadd"));
++              t += "\n";
++
++              std::istringstream i(t);
+ 
+               std::ofstream ofs(HEADERADD ".new");
+ 
+@@ -623,7 +633,10 @@ HANDLER("ADMINUPDATE", do_admin_update)
+       }
+ 
+       {
+-              std::istringstream i(std::string(cgi("optheaderdel")) + "\n");
++              std::string t(cgi("optheaderdel"));
++              t += "\n";
++
++              std::istringstream i(t);
+ 
+               std::ofstream ofs(HEADERDEL ".new");
+ 
+@@ -953,10 +966,10 @@ static void sendsubunsub(std::string ext
  
        if (ctlmsg.start(ext, address, "ctlmsg"))
        {
@@ -15,7 +60,7 @@
  
                if (ctlmsg.wait())
                {
-@@ -1100,10 +1100,10 @@ static void listrequest2(std::string lis
+@@ -1100,10 +1113,10 @@ static void listrequest2(std::string lis
                        if (confirm.start(method + "-" + token, "",
                                          "ctlmsg"))
                        {
@@ -28,7 +73,7 @@
                                        "Subject: yes -- confirmed by WebMLM\n"
                                        "\n"
                                        "Confirmed\n");
-@@ -1117,9 +1117,9 @@ static void listrequest2(std::string lis
+@@ -1117,9 +1130,9 @@ static void listrequest2(std::string lis
                                char buf[1024];
                                bool isfirst=true;
  
diff -r e6c602b9ae76 -r da27119bfe02 mail/courier-mta/patches/patch-aq
--- a/mail/courier-mta/patches/patch-aq Thu Sep 06 01:12:33 2007 +0000
+++ b/mail/courier-mta/patches/patch-aq Thu Sep 06 04:05:39 2007 +0000
@@ -1,8 +1,18 @@
-$NetBSD: patch-aq,v 1.1 2007/08/10 17:57:06 jlam Exp $
+$NetBSD: patch-aq,v 1.2 2007/09/06 04:05:40 jlam Exp $
 
---- courier/webmlmdsublist.C.orig      2007-06-15 22:21:24.000000000 -0400
+--- courier/webmlmdsublist.C.orig      Sat Jun 16 02:21:24 2007
 +++ courier/webmlmdsublist.C
-@@ -319,7 +319,7 @@ static void dodel(WSubList &sub_list)
+@@ -196,7 +196,8 @@ public:
+       std::fstream &getSubListFp() { return sublist; }
+ };
+ 
+-WSubList::WSubList() : sublist(SUBLIST), idxsublist(SUBLIST ".idx"),
++WSubList::WSubList() : sublist(SUBLIST, std::fstream::in|std::fstream::out),
++                     idxsublist(SUBLIST ".idx"),
+                      idxEntryCount(0)
+ {
+ }
+@@ -319,7 +320,7 @@ static void dodel(WSubList &sub_list)
  
        unsubscribe.mk_received_header();
  
@@ -11,7 +21,7 @@
  
        fprintf(fp,
                "Subject: admin unsubscribe\n"
-@@ -578,7 +578,7 @@ HANDLER("SUBINFO", emit_subinfo)
+@@ -578,7 +579,7 @@ HANDLER("SUBINFO", emit_subinfo)
  
        char linebuf[256];
  
diff -r e6c602b9ae76 -r da27119bfe02 mail/courier-mta/patches/patch-as
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/courier-mta/patches/patch-as Thu Sep 06 04:05:39 2007 +0000
@@ -0,0 +1,21 @@
+$NetBSD: patch-as,v 1.1 2007/09/06 04:05:40 jlam Exp $
+
+--- courier/webmlmd.H.orig     Sat Jun 16 02:21:24 2007
++++ courier/webmlmd.H
+@@ -8,6 +8,7 @@
+ #ifndef webmlmd_H
+ #define webmlmd_H
+ 
++#include <algorithm>
+ #include <list>
+ #include <string>
+ #include <map>
+@@ -48,7 +49,7 @@ namespace webmlmd {
+               T t;
+ 
+               t.reserve(s.size() * 6 / 5);
+-              class T::iterator b=s.begin(), e=s.end(), p=b;
++              typename T::iterator b=s.begin(), e=s.end(), p=b;
+ 
+               while (b != e)
+               {
diff -r e6c602b9ae76 -r da27119bfe02 mail/courier-mta/patches/patch-at
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/courier-mta/patches/patch-at Thu Sep 06 04:05:39 2007 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-at,v 1.1 2007/09/06 04:05:40 jlam Exp $
+
+--- webmail/folder.c.orig      Sun May 20 00:04:55 2007
++++ webmail/folder.c
+@@ -271,7 +271,7 @@ void folder_delmsgs(const char *dir, siz
+       } 
+       else if (*cgi("cmdpurgeall")) 
+       {
+-          char *deldir;
++          char *cur, *deldir;
+           struct maildir_info minfo;
+ 
+           if (maildir_info_imap_find(&minfo, dir, login_returnaddr())<0) 
+@@ -289,7 +289,7 @@ void folder_delmsgs(const char *dir, siz
+               return;
+           }
+           
+-          char *cur = malloc(strlen(deldir)+5);
++          cur = malloc(strlen(deldir)+5);
+           strcpy(cur, deldir);
+           strcat(cur, "/cur");
+ 
diff -r e6c602b9ae76 -r da27119bfe02 mail/courier-mta/patches/patch-au
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/courier-mta/patches/patch-au Thu Sep 06 04:05:39 2007 +0000
@@ -0,0 +1,38 @@
+$NetBSD: patch-au,v 1.1 2007/09/06 04:05:41 jlam Exp $
+
+--- webmail/newmsg.c.orig      Sun May  6 21:49:29 2007
++++ webmail/newmsg.c
+@@ -72,12 +72,15 @@ static void newmsg_header(const char *la
+ {
+ int           hdrmaxlen=512;
+ const char    *p=getarg("HDRMAXLEN");
++#if   HAVE_SQWEBMAIL_UNICODE
++const struct unicode_info *uiptr;
++#endif
+ 
+       if (p && (atoi(p) > hdrmaxlen))
+               hdrmaxlen=atoi(p);
+ 
+ #if   HAVE_SQWEBMAIL_UNICODE
+-const struct unicode_info *uiptr=unicode_find(sqwebmail_content_charset);
++      uiptr=unicode_find(sqwebmail_content_charset);
+ #endif
+       printf("<tr><th align=\"right\"><p class=\"new-message-header\">"
+              "<span class=\"new-message-header-%s\">%s</span></p></th>"
+@@ -411,6 +414,7 @@ void newmsg_init(const char *folder, con
+       char    *draftmessagefilename;
+       const   char *p;
+       FILE    *fp;
++      int     wbnochangingfrom;
+       int     attachcnt=0;
+       char    *cursubj, *curto, *curcc, *curbcc, *curfrom, *curreplyto;
+ 
+@@ -560,7 +564,7 @@ void newmsg_init(const char *folder, con
+       printf("<table width=\"100%%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\" class=\"new-message-box\"><tr><td>\n");
+ 
+       printf("<table border=\"0\" width=\"100%%\">\n");
+-      int wbnochangingfrom=auth_getoptionenvint("wbnochangingfrom");
++      wbnochangingfrom=auth_getoptionenvint("wbnochangingfrom");
+       if (wbnochangingfrom < 2)
+               newmsg_header_rfc822(fromlab, "headerfrom", curfrom,
+                       *cgi("from") ? cgi("from"):
diff -r e6c602b9ae76 -r da27119bfe02 mail/sqwebmail/distinfo
--- a/mail/sqwebmail/distinfo   Thu Sep 06 01:12:33 2007 +0000
+++ b/mail/sqwebmail/distinfo   Thu Sep 06 04:05:39 2007 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.16 2007/08/10 17:57:13 jlam Exp $
+$NetBSD: distinfo,v 1.17 2007/09/06 04:05:41 jlam Exp $
 
 SHA1 (sqwebmail-5.1.6.tar.bz2) = 04ecff69dfcd01fc947adfafe39d8f2bd80254e6
 RMD160 (sqwebmail-5.1.6.tar.bz2) = 231c0f972a7423c231ff7db8bacc6417aae5354a
@@ -8,4 +8,6 @@
 SHA1 (patch-ah) = 5f88760e7d69fbad6894557283c069e0c9592044
 SHA1 (patch-ai) = def2f4d30bf5f15ea78f401f3c4ca2f2ec8c0ad2
 SHA1 (patch-aj) = 510c91faf9d0cd584b5ec9da07a034a7d89d62f3
+SHA1 (patch-ak) = e84966ea5ed5cee58bbde380f0d9ace31034e1ba
 SHA1 (patch-am) = 8d78356319eead76a9170bf8183ddddb34481552
+SHA1 (patch-an) = 288dfa758d39c8e0efde2ff8b9325268b3910265
diff -r e6c602b9ae76 -r da27119bfe02 mail/sqwebmail/patches/patch-ak
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/sqwebmail/patches/patch-ak   Thu Sep 06 04:05:39 2007 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-ak,v 1.3 2007/09/06 04:05:41 jlam Exp $
+
+--- sqwebmail/folder.c.orig    2007-02-24 14:05:45.000000000 -0500
++++ sqwebmail/folder.c
+@@ -270,7 +270,7 @@ void folder_delmsgs(const char *dir, siz
+       } 
+       else if (*cgi("cmdpurgeall")) 
+       {
+-          char *deldir;
++          char *cur, *deldir;
+           struct maildir_info minfo;
+ 
+           if (maildir_info_imap_find(&minfo, dir, login_returnaddr())<0) 
+@@ -288,7 +288,7 @@ void folder_delmsgs(const char *dir, siz
+               return;
+           }
+           
+-          char *cur = malloc(strlen(deldir)+5);
++          cur = malloc(strlen(deldir)+5);
+           strcpy(cur, deldir);
+           strcat(cur, "/cur");
+ 
diff -r e6c602b9ae76 -r da27119bfe02 mail/sqwebmail/patches/patch-an
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/sqwebmail/patches/patch-an   Thu Sep 06 04:05:39 2007 +0000
@@ -0,0 +1,38 @@
+$NetBSD: patch-an,v 1.1 2007/09/06 04:05:42 jlam Exp $
+
+--- sqwebmail/newmsg.c.orig    2007-02-24 14:05:45.000000000 -0500
++++ sqwebmail/newmsg.c
+@@ -72,12 +72,15 @@ static void newmsg_header(const char *la
+ {
+ int           hdrmaxlen=512;
+ const char    *p=getarg("HDRMAXLEN");
++#if   HAVE_SQWEBMAIL_UNICODE
++const struct unicode_info *uiptr;
++#endif
+ 
+       if (p && (atoi(p) > hdrmaxlen))
+               hdrmaxlen=atoi(p);
+ 
+ #if   HAVE_SQWEBMAIL_UNICODE
+-const struct unicode_info *uiptr=unicode_find(sqwebmail_content_charset);
++      uiptr=unicode_find(sqwebmail_content_charset);
+ #endif
+       printf("<tr><th align=\"right\"><p class=\"new-message-header\">"
+              "<span class=\"new-message-header-%s\">%s</span></p></th>"
+@@ -493,6 +496,7 @@ void newmsg_init(const char *folder, con
+       char    *draftmessagefilename;
+       const   char *p;
+       FILE    *fp;
++      int     wbnochangingfrom;



Home | Main Index | Thread Index | Old Index