diff options
author | jlam <jlam> | 2007-09-06 04:05:39 +0000 |
---|---|---|
committer | jlam <jlam> | 2007-09-06 04:05:39 +0000 |
commit | 3ed5a45250cdc504298ed3696c963be1b41dfe5f (patch) | |
tree | 73c9ad6379a29bd2adf398a97fd976e6507bbd41 /mail/courier-mta/patches | |
parent | 7b9dad6f3f71d339651533216059794f46a46afa (diff) | |
download | pkgsrc-3ed5a45250cdc504298ed3696c963be1b41dfe5f.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/patches')
-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 |
5 files changed, 145 insertions, 9 deletions
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"): |