diff options
author | dholland <dholland@pkgsrc.org> | 2012-12-30 05:38:55 +0000 |
---|---|---|
committer | dholland <dholland@pkgsrc.org> | 2012-12-30 05:38:55 +0000 |
commit | 95992a94147552c3b568843a8e4d5330433c8591 (patch) | |
tree | 42bda89c0cadb9bd1fd96338c9477a6601063c2a /mail | |
parent | 98effdd073e31be5dede347fb0e2efbaad7f444a (diff) | |
download | pkgsrc-95992a94147552c3b568843a8e4d5330433c8591.tar.gz |
Add required standard headers.
XXX: this package should be terminated with prejudice
Diffstat (limited to 'mail')
-rw-r--r-- | mail/metamail/distinfo | 7 | ||||
-rw-r--r-- | mail/metamail/patches/patch-ae | 46 | ||||
-rw-r--r-- | mail/metamail/patches/patch-af | 43 | ||||
-rw-r--r-- | mail/metamail/patches/patch-metamail_shared.c | 42 |
4 files changed, 110 insertions, 28 deletions
diff --git a/mail/metamail/distinfo b/mail/metamail/distinfo index dae1e7cacd2..50f913022ac 100644 --- a/mail/metamail/distinfo +++ b/mail/metamail/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.25 2012/10/26 20:27:15 joerg Exp $ +$NetBSD: distinfo,v 1.26 2012/12/30 05:38:55 dholland Exp $ SHA1 (mm2.7.tar.Z) = 8f213baec9b17c05bcb066f616977a561757d7a6 RMD160 (mm2.7.tar.Z) = ae322cad0653140cbe7f0148ce48757df98c26b0 @@ -7,8 +7,8 @@ SHA1 (patch-aa) = 6f1d8f9cd5773deb3a050cecdc8a57718c953e0b SHA1 (patch-ab) = 15dd81405551f4d7d3c0e59cf49038857603a9eb SHA1 (patch-ac) = f0b04f7d6b17fb5c71a09b4caaf4298acdcff64e SHA1 (patch-ad) = 1f152ab38d3c2da42afdb3b3c6a1b218ac8d3996 -SHA1 (patch-ae) = 7abed3b508779f354036a3634510d4c68c3670a8 -SHA1 (patch-af) = 93e566a5e174fd259eb855e24a6dd4b7d5ffeed4 +SHA1 (patch-ae) = c7d1997371ee5d61a0c7236da1f408502eeb0f1a +SHA1 (patch-af) = 03d08e3bdff9009ef7f978364d99a9243f28eda5 SHA1 (patch-ag) = 674ceb59955de76e9a673ee4969d359a30fba5f8 SHA1 (patch-ah) = 69f286fbb45420921cfe57e16c6ec220e409b784 SHA1 (patch-ai) = 97130d5769767788c5b20993805536a8ddd9b76e @@ -24,4 +24,5 @@ SHA1 (patch-ar) = 7167065afb79f59febbf7821ad625972eaf921f2 SHA1 (patch-as) = 8d8c31f1ff508e9d7fc73a03a5f7ba63faa118ef SHA1 (patch-at) = 9193001c138875a0a6cc562f9f8a0424f78328aa SHA1 (patch-metamail_codes.c) = df6df4ff4abeba96c0d68f3d025390121c2b589a +SHA1 (patch-metamail_shared.c) = b014d77bb5d09cd2d3199bcaecaf51da490d70ca SHA1 (patch-richmail_iso2022.c) = 3a6ff631d50963d31701e7a0f5519967bbbf1e2e diff --git a/mail/metamail/patches/patch-ae b/mail/metamail/patches/patch-ae index ebfdbda31de..e5771d2b613 100644 --- a/mail/metamail/patches/patch-ae +++ b/mail/metamail/patches/patch-ae @@ -1,10 +1,40 @@ -$NetBSD: patch-ae,v 1.5 2004/03/04 15:04:41 cjep Exp $ ---- metamail/splitmail.c.orig Mon Jan 31 23:23:14 1994 -+++ metamail/splitmail.c Sat Feb 28 20:08:44 2004 -@@ -41,8 +41,8 @@ +$NetBSD: patch-ae,v 1.6 2012/12/30 05:38:55 dholland Exp $ + +- use required standard headers +- make sure index() is available +- don't provide own declarations of standard functions +- fix path to sendmail (although, is this really adequately MI?) +- buffer length fix + +--- metamail/splitmail.c.orig 1994-01-31 22:23:14.000000000 +0000 ++++ metamail/splitmail.c +@@ -21,14 +21,20 @@ WITHOUT ANY EXPRESS OR IMPLIED WARRANTIE + ******************************************************* */ + + #include <stdio.h> ++#include <stdlib.h> ++#include <string.h> + #include <sys/types.h> + #include <sys/stat.h> + #include <config.h> + #include <ctype.h> + #include <time.h> + ++#ifndef index ++#define index(a, b) strchr(a, b) ++#endif ++ + #define MINCHUNKSIZE 20000 /* Better be enough to hold the headers, or we die! */ +-extern char *malloc(), *index(), *getmyname(); ++extern char *getmyname(); + + #ifdef AMIGA + #define Prototype extern +@@ -40,9 +46,8 @@ extern char *malloc(), *index(), *getmyn + #define NORMALDELIVERYCMD NormalDeliveryCmd #define VERBOSEDELIVERYCMD VerboseDeliveryCmd #else - extern char *getenv(); +-extern char *getenv(); -#define NORMALDELIVERYCMD "/usr/lib/sendmail -t -oi" -#define VERBOSEDELIVERYCMD "/usr/lib/sendmail -t -v -oi" +#define NORMALDELIVERYCMD "/usr/sbin/sendmail -t -oi" @@ -12,7 +42,7 @@ $NetBSD: patch-ae,v 1.5 2004/03/04 15:04:41 cjep Exp $ #endif usageexit() { -@@ -194,7 +194,7 @@ +@@ -194,7 +199,7 @@ char **argv; s = endofheader(from); /* would be index(from, '\n'), but need to check for continuation lines */ *s = '\0'; @@ -21,7 +51,7 @@ $NetBSD: patch-ae,v 1.5 2004/03/04 15:04:41 cjep Exp $ strcat(SharedHeaders, from); strcat(SharedHeaders, "\n"); } -@@ -339,9 +339,10 @@ +@@ -339,9 +344,10 @@ static char *SharedHeads[] = { NULL }; @@ -33,7 +63,7 @@ $NetBSD: patch-ae,v 1.5 2004/03/04 15:04:41 cjep Exp $ char **OrigID; { int i; -@@ -361,7 +362,8 @@ +@@ -361,7 +367,8 @@ char **OrigID; } if (!ULstrcmp(s, "subject")) { *colon = ':'; diff --git a/mail/metamail/patches/patch-af b/mail/metamail/patches/patch-af index 7caa21da4fc..385b853b6fe 100644 --- a/mail/metamail/patches/patch-af +++ b/mail/metamail/patches/patch-af @@ -1,16 +1,25 @@ -$NetBSD: patch-af,v 1.4 2012/10/26 20:27:15 joerg Exp $ +$NetBSD: patch-af,v 1.5 2012/12/30 05:38:55 dholland Exp $ + +- use required standard headers +- don't provide own declarations of standard functions +- declare own functions +- use C89 +- don't use gets() +- ...? (XXX) --- metamail/mailto.c.orig 1994-02-09 20:30:26.000000000 +0000 +++ metamail/mailto.c -@@ -36,6 +36,7 @@ STILL NEED TO DO/SUPPORT: +@@ -36,7 +36,9 @@ STILL NEED TO DO/SUPPORT: -- Replace EditString with something that does the right thing in-line. */ +#include <stdlib.h> #include <stdio.h> ++#include <string.h> #include <ctype.h> #include <config.h> -@@ -50,8 +51,6 @@ STILL NEED TO DO/SUPPORT: + #include <pwd.h> +@@ -50,8 +52,6 @@ STILL NEED TO DO/SUPPORT: #include <getfiles.h> #include <time.h> #include <lib_protos.h> @@ -19,7 +28,7 @@ $NetBSD: patch-af,v 1.4 2012/10/26 20:27:15 joerg Exp $ #endif #ifdef SYSV -@@ -60,9 +59,16 @@ extern char *getenv(); +@@ -60,9 +60,16 @@ extern char *getenv(); #include <unistd.h> #endif @@ -37,7 +46,7 @@ $NetBSD: patch-af,v 1.4 2012/10/26 20:27:15 joerg Exp $ /* The main data structure for the multiple parts of the mail */ struct mailpart { -@@ -570,6 +576,7 @@ char **argv; +@@ -570,6 +577,7 @@ char **argv; if (isupper(*sdum)) *sdum = tolower(*sdum); } if (strcmp(CharacterSet, "us-ascii") @@ -45,7 +54,7 @@ $NetBSD: patch-af,v 1.4 2012/10/26 20:27:15 joerg Exp $ && strncmp(CharacterSet, "iso-8859-", 9)) { fprintf(stderr, "mailto: Unsupported character set: %s\n", CharacterSet); exit(-1); -@@ -1042,10 +1049,7 @@ char *newid() { +@@ -1042,10 +1050,7 @@ char *newid() { return(idbuf); } @@ -57,7 +66,7 @@ $NetBSD: patch-af,v 1.4 2012/10/26 20:27:15 joerg Exp $ { FILE *fpin; static int ctr = 0; -@@ -1130,6 +1134,7 @@ struct mailpart *part; +@@ -1130,6 +1135,7 @@ struct mailpart *part; if (part->isrich) { if (strcmp(CharacterSet, "us-ascii") && (strncmp(CharacterSet, "iso-8859-", 9) @@ -65,7 +74,7 @@ $NetBSD: patch-af,v 1.4 2012/10/26 20:27:15 joerg Exp $ || part->encoding_type_needed != ENC_NONE)) { fprintf(fp, "Content-type: text/richtext; charset=\"%s\"\n", CharacterSet); } else { -@@ -1140,6 +1145,7 @@ struct mailpart *part; +@@ -1140,6 +1146,7 @@ struct mailpart *part; WriteCtypeNicely(fp, part->content_type); if (strcmp(CharacterSet, "us-ascii") && (strncmp(CharacterSet, "iso-8859-", 9) @@ -73,7 +82,7 @@ $NetBSD: patch-af,v 1.4 2012/10/26 20:27:15 joerg Exp $ || part->encoding_type_needed != ENC_NONE)) { fprintf(fp, "; charset=\"%s\"\n", CharacterSet); } else fputs("\n", fp); -@@ -1328,11 +1334,7 @@ struct mailpart *part; +@@ -1328,11 +1335,7 @@ struct mailpart *part; } } @@ -86,7 +95,7 @@ $NetBSD: patch-af,v 1.4 2012/10/26 20:27:15 joerg Exp $ { static int InNewLineSequence=1; int c=0; -@@ -1745,6 +1747,7 @@ CreateNewPart() { +@@ -1745,6 +1748,7 @@ CreateNewPart() { } printf("\n\nEnter your choice as a number from 0 to %d: ", i); fflush(stdout); @@ -94,7 +103,7 @@ $NetBSD: patch-af,v 1.4 2012/10/26 20:27:15 joerg Exp $ fgets(LineBuf, sizeof(LineBuf), stdin); ans = atoi(LineBuf); if (ans == 0 || ans == 1) { -@@ -1791,7 +1794,7 @@ CreateNewPart() { +@@ -1791,7 +1795,7 @@ CreateNewPart() { int ct; printf("\nEnter the MIME Content-type value for the data from file %s\n (type '?' for a list of locally-valid content-types): ", sdum); fflush(stdout); @@ -103,7 +112,7 @@ $NetBSD: patch-af,v 1.4 2012/10/26 20:27:15 joerg Exp $ if (index(LineBuf, '/')) { char lc[100], *s, AnsBuf[100]; strcpy(lc, LineBuf); -@@ -1809,7 +1812,7 @@ CreateNewPart() { +@@ -1809,7 +1813,7 @@ CreateNewPart() { } if (mc) break; printf("The MIME content-type '%s' is not listed in your local mailcap files,\nand may not be a valid MIME type. Do you want to use it anyway [no] ? ", LineBuf); @@ -112,7 +121,7 @@ $NetBSD: patch-af,v 1.4 2012/10/26 20:27:15 joerg Exp $ while (s && *s && isspace((unsigned char) *s)) ++s; if (s && (*s == 'y' || *s == 'Y')) break; continue; -@@ -2073,8 +2076,7 @@ char *ctype, *pat; +@@ -2073,8 +2077,7 @@ char *ctype, *pat; return(0); } @@ -122,7 +131,7 @@ $NetBSD: patch-af,v 1.4 2012/10/26 20:27:15 joerg Exp $ { char *editor = NULL; char *CmdBuf, *CmdBuf2, LineBuf[100]; -@@ -2212,9 +2214,7 @@ int IsAndrew; +@@ -2212,9 +2215,7 @@ int IsAndrew; } } @@ -133,7 +142,7 @@ $NetBSD: patch-af,v 1.4 2012/10/26 20:27:15 joerg Exp $ { FILE *fp; char *LineBuf = NULL, *sdum; -@@ -2290,8 +2290,7 @@ struct alias { +@@ -2290,8 +2291,7 @@ struct alias { struct alias *next; } *FirstAlias = NULL; @@ -143,7 +152,7 @@ $NetBSD: patch-af,v 1.4 2012/10/26 20:27:15 joerg Exp $ { struct alias *tmpalias; char *s, *s2; -@@ -2357,10 +2356,7 @@ char *s; +@@ -2357,10 +2357,7 @@ char *s; return(NULL); } @@ -155,7 +164,7 @@ $NetBSD: patch-af,v 1.4 2012/10/26 20:27:15 joerg Exp $ { char *firstnonascii, *firstascii; -@@ -2436,10 +2432,7 @@ char *hdr; +@@ -2436,10 +2433,7 @@ char *hdr; } } diff --git a/mail/metamail/patches/patch-metamail_shared.c b/mail/metamail/patches/patch-metamail_shared.c new file mode 100644 index 00000000000..f3edc71e067 --- /dev/null +++ b/mail/metamail/patches/patch-metamail_shared.c @@ -0,0 +1,42 @@ +$NetBSD: patch-metamail_shared.c,v 1.1 2012/12/30 05:38:55 dholland Exp $ + +- use standard headers +- don't provide own declarations of standard functions +- don't cast the return value of malloc + +--- metamail/shared.c~ 1993-05-16 18:19:32.000000000 +0000 ++++ metamail/shared.c +@@ -1,4 +1,6 @@ + #include <stdio.h> ++#include <stdlib.h> ++#include <string.h> + #include <ctype.h> + #include <config.h> + #ifdef SYSV +@@ -6,7 +8,6 @@ + #include <sys/utsname.h> + #endif + +-extern char *malloc(); + char **Exceptions; + int *NeedsPortableNewlines; + int ExceptionsAlloced = 0, ExceptionsUsed = 0; +@@ -18,14 +19,14 @@ int needsportable; + char *s; + if (ExceptionsAlloced == 0) { + ExceptionsAlloced = 25; +- Exceptions = (char **) malloc(ExceptionsAlloced * sizeof(char *)); +- NeedsPortableNewlines = (int *) malloc(ExceptionsAlloced * sizeof(int)); ++ Exceptions = malloc(ExceptionsAlloced * sizeof(char *)); ++ NeedsPortableNewlines = malloc(ExceptionsAlloced * sizeof(int)); + if (!Exceptions || !NeedsPortableNewlines) return(-1); + } + if (ExceptionsUsed >= ExceptionsAlloced) { + ExceptionsAlloced += 25; +- Exceptions = (char **) realloc(Exceptions, ExceptionsAlloced * sizeof(char *)); +- NeedsPortableNewlines = (int *) realloc(NeedsPortableNewlines, ExceptionsAlloced * sizeof(int)); ++ Exceptions = realloc(Exceptions, ExceptionsAlloced * sizeof(char *)); ++ NeedsPortableNewlines = realloc(NeedsPortableNewlines, ExceptionsAlloced * sizeof(int)); + if (!Exceptions || !NeedsPortableNewlines) return(-1); + } + s = malloc(1+strlen(contenttype)); |