diff options
author | jlam <jlam@pkgsrc.org> | 2007-09-06 04:05:39 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2007-09-06 04:05:39 +0000 |
commit | 7461413f6b50b8c725762563258fae50e7329c75 (patch) | |
tree | 73c9ad6379a29bd2adf398a97fd976e6507bbd41 /mail/courier-mta | |
parent | 4c66b5984c0671ed605fbdf44c2de5629509d58b (diff) | |
download | pkgsrc-7461413f6b50b8c725762563258fae50e7329c75.tar.gz |
Allow this code to compile with an older version of GCC and on an older
version of FreeBSD.
Diffstat (limited to 'mail/courier-mta')
-rw-r--r-- | mail/courier-mta/distinfo | 9 | ||||
-rw-r--r-- | mail/courier-mta/patches/patch-an | 55 | ||||
-rw-r--r-- | mail/courier-mta/patches/patch-aq | 18 | ||||
-rw-r--r-- | mail/courier-mta/patches/patch-as | 21 | ||||
-rw-r--r-- | mail/courier-mta/patches/patch-at | 22 | ||||
-rw-r--r-- | mail/courier-mta/patches/patch-au | 38 |
6 files changed, 151 insertions, 12 deletions
diff --git a/mail/courier-mta/distinfo b/mail/courier-mta/distinfo index 1a49ded139f..60d15cf41d1 100644 --- a/mail/courier-mta/distinfo +++ b/mail/courier-mta/distinfo @@ -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-ai) = 5324b99ebc0492c77f67a8c627ceb3c3efa9d852 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 --git a/mail/courier-mta/patches/patch-an b/mail/courier-mta/patches/patch-an index b0cf2b5bf62..1f5e80228f8 100644 --- a/mail/courier-mta/patches/patch-an +++ b/mail/courier-mta/patches/patch-an @@ -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 @@ $NetBSD: patch-an,v 1.1 2007/08/10 17:57:05 jlam Exp $ 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 @@ $NetBSD: patch-an,v 1.1 2007/08/10 17:57:05 jlam Exp $ "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 --git a/mail/courier-mta/patches/patch-aq b/mail/courier-mta/patches/patch-aq index c28cb8240ab..a4e9704f560 100644 --- a/mail/courier-mta/patches/patch-aq +++ b/mail/courier-mta/patches/patch-aq @@ -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 @@ $NetBSD: patch-aq,v 1.1 2007/08/10 17:57:06 jlam Exp $ 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 --git a/mail/courier-mta/patches/patch-as b/mail/courier-mta/patches/patch-as new file mode 100644 index 00000000000..8384fcca9d9 --- /dev/null +++ b/mail/courier-mta/patches/patch-as @@ -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 --git a/mail/courier-mta/patches/patch-at b/mail/courier-mta/patches/patch-at new file mode 100644 index 00000000000..91ce0255c4f --- /dev/null +++ b/mail/courier-mta/patches/patch-at @@ -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 --git a/mail/courier-mta/patches/patch-au b/mail/courier-mta/patches/patch-au new file mode 100644 index 00000000000..4b1bf9ba214 --- /dev/null +++ b/mail/courier-mta/patches/patch-au @@ -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"): |