From e20075bc88d23a11e56c3af9be75d57ab3c40ac0 Mon Sep 17 00:00:00 2001 From: naddy Date: Mon, 12 Jul 2010 19:28:14 +0000 Subject: [PATCH] #includes for function prototypes use system putenv() --- mail/metamail/Makefile | 5 ++- mail/metamail/patches/patch-metamail_Makefile | 15 +++++++ mail/metamail/patches/patch-metamail_codes_c | 11 ++++++ mail/metamail/patches/patch-metamail_mailto_c | 33 ++++++++++++++-- .../patches/patch-metamail_metamail_c | 39 +++++++++++++++---- .../patches/patch-metamail_mmencode_c | 11 ++++++ mail/metamail/patches/patch-metamail_shared_c | 18 +++++++++ .../patches/patch-metamail_splitmail_c | 33 ++++++++++++---- .../metamail/patches/patch-richmail_richset_c | 11 ++++++ 9 files changed, 156 insertions(+), 20 deletions(-) create mode 100644 mail/metamail/patches/patch-metamail_Makefile create mode 100644 mail/metamail/patches/patch-metamail_codes_c create mode 100644 mail/metamail/patches/patch-metamail_mmencode_c create mode 100644 mail/metamail/patches/patch-metamail_shared_c create mode 100644 mail/metamail/patches/patch-richmail_richset_c diff --git a/mail/metamail/Makefile b/mail/metamail/Makefile index 331bae439bf..3658eba78d3 100644 --- a/mail/metamail/Makefile +++ b/mail/metamail/Makefile @@ -1,9 +1,10 @@ -# $OpenBSD: Makefile,v 1.22 2007/09/16 00:17:05 merdely Exp $ +# $OpenBSD: Makefile,v 1.23 2010/07/12 19:28:14 naddy Exp $ COMMENT= MIME implementation DISTNAME= mm2.7 -PKGNAME= metamail-2.7p0 +PKGNAME= metamail-2.7 +REVISION= 1 CATEGORIES= mail MASTER_SITES= http://www.guppylake.com/~nsb/metamail/ diff --git a/mail/metamail/patches/patch-metamail_Makefile b/mail/metamail/patches/patch-metamail_Makefile new file mode 100644 index 00000000000..11b16fb4fff --- /dev/null +++ b/mail/metamail/patches/patch-metamail_Makefile @@ -0,0 +1,15 @@ +$OpenBSD: patch-metamail_Makefile,v 1.1 2010/07/12 19:28:14 naddy Exp $ +--- metamail/Makefile.orig Mon Jul 12 21:11:43 2010 ++++ metamail/Makefile Mon Jul 12 21:11:57 2010 +@@ -51,9 +51,9 @@ splitmail: splitmail.o shared.o + rm -f splitmail + $(CC) $(LOCALCFLAGS) -o splitmail splitmail.o shared.o $(LDLIBS) + +-metamail: metamail.o codes.o uue.o shared.o putenv.o ++metamail: metamail.o codes.o uue.o shared.o + rm -f metamail +- $(CC) $(LOCALCFLAGS) -o metamail metamail.o putenv.o codes.o uue.o shared.o $(LDLIBS) ++ $(CC) $(LOCALCFLAGS) -o metamail metamail.o codes.o uue.o shared.o $(LDLIBS) + + clean: + -rm -f metamail mmencode mailto splitmail *.o *.BAK diff --git a/mail/metamail/patches/patch-metamail_codes_c b/mail/metamail/patches/patch-metamail_codes_c new file mode 100644 index 00000000000..093bd3ea898 --- /dev/null +++ b/mail/metamail/patches/patch-metamail_codes_c @@ -0,0 +1,11 @@ +$OpenBSD: patch-metamail_codes_c,v 1.1 2010/07/12 19:28:14 naddy Exp $ +--- metamail/codes.c.orig Mon Jul 12 21:08:58 2010 ++++ metamail/codes.c Mon Jul 12 21:09:12 2010 +@@ -13,6 +13,7 @@ OF THIS MATERIAL FOR ANY PURPOSE. IT IS PROVIDED "AS + WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. + */ + #include ++#include + #include + #include + diff --git a/mail/metamail/patches/patch-metamail_mailto_c b/mail/metamail/patches/patch-metamail_mailto_c index fa444321c0b..98d17b2bebe 100644 --- a/mail/metamail/patches/patch-metamail_mailto_c +++ b/mail/metamail/patches/patch-metamail_mailto_c @@ -1,6 +1,33 @@ -$OpenBSD: patch-metamail_mailto_c,v 1.2 2004/05/06 22:45:08 pvalchev Exp $ ---- metamail/mailto.c.orig 1994-02-09 13:30:26.000000000 -0700 -+++ metamail/mailto.c 2004-05-06 16:40:04.000000000 -0600 +$OpenBSD: patch-metamail_mailto_c,v 1.3 2010/07/12 19:28:14 naddy Exp $ +--- metamail/mailto.c.orig Wed Feb 9 21:30:26 1994 ++++ metamail/mailto.c Mon Jul 12 21:16:31 2010 +@@ -37,6 +37,8 @@ STILL NEED TO DO/SUPPORT: + */ + + #include ++#include ++#include + #include + #include + #include +@@ -50,8 +52,6 @@ STILL NEED TO DO/SUPPORT: + #include + #include + #include +-#else +-extern char *getenv(); + #endif + + #ifdef SYSV +@@ -60,7 +60,7 @@ extern char *getenv(); + #include + #endif + +-extern char *malloc(), *realloc(), *index(), *getmyname(); ++extern char *getmyname(); + struct mailpart *CreateNewPart(); + + /* The main data structure for the multiple parts of the mail */ @@ -195,7 +195,7 @@ tmpname() { sprintf(s, "%s/mm.XXXXXX", tmproot); } diff --git a/mail/metamail/patches/patch-metamail_metamail_c b/mail/metamail/patches/patch-metamail_metamail_c index 5442f0cee4b..5b45a22f355 100644 --- a/mail/metamail/patches/patch-metamail_metamail_c +++ b/mail/metamail/patches/patch-metamail_metamail_c @@ -1,7 +1,16 @@ -$OpenBSD: patch-metamail_metamail_c,v 1.3 2010/07/12 19:03:13 naddy Exp $ +$OpenBSD: patch-metamail_metamail_c,v 1.4 2010/07/12 19:28:14 naddy Exp $ --- metamail/metamail.c.orig Thu Feb 17 02:57:19 1994 -+++ metamail/metamail.c Mon Jul 12 21:01:43 2010 -@@ -29,7 +29,7 @@ WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. ++++ metamail/metamail.c Mon Jul 12 21:06:16 2010 +@@ -20,6 +20,8 @@ WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. + + ******************************************************* */ + #include ++#include ++#include + #include + #include + #include +@@ -29,7 +31,7 @@ WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. #ifdef BORLAND #define F_OK 0 extern unsigned _stklen = 16384; @@ -10,7 +19,21 @@ $OpenBSD: patch-metamail_metamail_c,v 1.3 2010/07/12 19:03:13 naddy Exp $ #define WRITE_BINARY "w" #else /* BORLAND */ #ifdef MICROSOFT -@@ -302,24 +302,6 @@ char **argv; +@@ -100,13 +102,6 @@ extern char **environ, *gets(); + #define CMDSIZE 1200 /* Maximum size of command to execute */ + + #define LINE_BUF_SIZE 2000 +-#ifndef MICROSOFT +-extern char *malloc(); +-extern char *realloc(); +-#endif +-extern char *getenv(); +-extern char *index(); +-extern char *rindex(); + char fileToDelete[MAX_FILE_NAME_SIZE]; + + char *FindParam(); +@@ -302,24 +297,6 @@ char **argv; int retcode; modpath(AUXPATH); @@ -35,7 +58,7 @@ $OpenBSD: patch-metamail_metamail_c,v 1.3 2010/07/12 19:03:13 naddy Exp $ tmproot = getenv("METAMAIL_TMPDIR"); if (!tmproot) tmproot="/tmp"; mailheaders = getenv("MM_HEADERS"); -@@ -1202,9 +1184,9 @@ char *SquirrelFile; +@@ -1202,9 +1179,9 @@ char *SquirrelFile; fprintf(outfp, "Content-type: %s", ContentType); for (j=0; j ++#include + #include + #ifdef MSDOS + #include diff --git a/mail/metamail/patches/patch-metamail_shared_c b/mail/metamail/patches/patch-metamail_shared_c new file mode 100644 index 00000000000..8b9a25b34d1 --- /dev/null +++ b/mail/metamail/patches/patch-metamail_shared_c @@ -0,0 +1,18 @@ +$OpenBSD: patch-metamail_shared_c,v 1.1 2010/07/12 19:28:14 naddy Exp $ +--- metamail/shared.c.orig Mon Jul 12 21:09:34 2010 ++++ metamail/shared.c Mon Jul 12 21:10:23 2010 +@@ -1,4 +1,6 @@ + #include ++#include ++#include + #include + #include + #ifdef SYSV +@@ -6,7 +8,6 @@ + #include + #endif + +-extern char *malloc(); + char **Exceptions; + int *NeedsPortableNewlines; + int ExceptionsAlloced = 0, ExceptionsUsed = 0; diff --git a/mail/metamail/patches/patch-metamail_splitmail_c b/mail/metamail/patches/patch-metamail_splitmail_c index cc92de78751..740bf99c9cc 100644 --- a/mail/metamail/patches/patch-metamail_splitmail_c +++ b/mail/metamail/patches/patch-metamail_splitmail_c @@ -1,10 +1,29 @@ -$OpenBSD: patch-metamail_splitmail_c,v 1.3 2010/07/12 19:03:14 naddy Exp $ +$OpenBSD: patch-metamail_splitmail_c,v 1.4 2010/07/12 19:28:14 naddy Exp $ --- metamail/splitmail.c.orig Mon Jan 31 23:23:14 1994 -+++ metamail/splitmail.c Mon Jul 12 21:01:43 2010 -@@ -41,8 +41,8 @@ extern char *malloc(), *index(), *getmyname(); ++++ metamail/splitmail.c Mon Jul 12 21:18:21 2010 +@@ -21,6 +21,8 @@ WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. + ******************************************************* */ + + #include ++#include ++#include + #include + #include + #include +@@ -28,7 +30,7 @@ WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. + #include + + #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 +42,8 @@ extern char *malloc(), *index(), *getmyname(); + #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 +31,7 @@ $OpenBSD: patch-metamail_splitmail_c,v 1.3 2010/07/12 19:03:14 naddy Exp $ #endif usageexit() { -@@ -194,7 +194,7 @@ char **argv; +@@ -194,7 +195,7 @@ char **argv; s = endofheader(from); /* would be index(from, '\n'), but need to check for continuation lines */ *s = '\0'; @@ -21,7 +40,7 @@ $OpenBSD: patch-metamail_splitmail_c,v 1.3 2010/07/12 19:03:14 naddy Exp $ strcat(SharedHeaders, from); strcat(SharedHeaders, "\n"); } -@@ -339,9 +339,10 @@ static char *SharedHeads[] = { +@@ -339,9 +340,10 @@ static char *SharedHeads[] = { NULL }; @@ -33,7 +52,7 @@ $OpenBSD: patch-metamail_splitmail_c,v 1.3 2010/07/12 19:03:14 naddy Exp $ char **OrigID; { int i; -@@ -361,7 +362,7 @@ char **OrigID; +@@ -361,7 +363,7 @@ char **OrigID; } if (!ULstrcmp(s, "subject")) { *colon = ':'; diff --git a/mail/metamail/patches/patch-richmail_richset_c b/mail/metamail/patches/patch-richmail_richset_c new file mode 100644 index 00000000000..a14a5e4f5e4 --- /dev/null +++ b/mail/metamail/patches/patch-richmail_richset_c @@ -0,0 +1,11 @@ +$OpenBSD: patch-richmail_richset_c,v 1.1 2010/07/12 19:28:14 naddy Exp $ +--- richmail/richset.c.orig Mon Jul 12 21:18:46 2010 ++++ richmail/richset.c Mon Jul 12 21:19:06 2010 +@@ -34,6 +34,7 @@ + -------------------------------------------------------------------------*/ + + #include ++#include + #include "richlex.h" + #include "richset.h" +