#includes for function prototypes

use system putenv()
This commit is contained in:
naddy 2010-07-12 19:28:14 +00:00
parent 7283a0afb2
commit e20075bc88
9 changed files with 156 additions and 20 deletions

View File

@ -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 COMMENT= MIME implementation
DISTNAME= mm2.7 DISTNAME= mm2.7
PKGNAME= metamail-2.7p0 PKGNAME= metamail-2.7
REVISION= 1
CATEGORIES= mail CATEGORIES= mail
MASTER_SITES= http://www.guppylake.com/~nsb/metamail/ MASTER_SITES= http://www.guppylake.com/~nsb/metamail/

View File

@ -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

View File

@ -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 <stdio.h>
+#include <string.h>
#include <ctype.h>
#include <config.h>

View File

@ -1,6 +1,33 @@
$OpenBSD: patch-metamail_mailto_c,v 1.2 2004/05/06 22:45:08 pvalchev Exp $ $OpenBSD: patch-metamail_mailto_c,v 1.3 2010/07/12 19:28:14 naddy Exp $
--- metamail/mailto.c.orig 1994-02-09 13:30:26.000000000 -0700 --- metamail/mailto.c.orig Wed Feb 9 21:30:26 1994
+++ metamail/mailto.c 2004-05-06 16:40:04.000000000 -0600 +++ metamail/mailto.c Mon Jul 12 21:16:31 2010
@@ -37,6 +37,8 @@ STILL NEED TO DO/SUPPORT:
*/
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include <ctype.h>
#include <config.h>
#include <pwd.h>
@@ -50,8 +52,6 @@ STILL NEED TO DO/SUPPORT:
#include <getfiles.h>
#include <time.h>
#include <lib_protos.h>
-#else
-extern char *getenv();
#endif
#ifdef SYSV
@@ -60,7 +60,7 @@ extern char *getenv();
#include <unistd.h>
#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() { @@ -195,7 +195,7 @@ tmpname() {
sprintf(s, "%s/mm.XXXXXX", tmproot); sprintf(s, "%s/mm.XXXXXX", tmproot);
} }

View File

@ -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.orig Thu Feb 17 02:57:19 1994
+++ metamail/metamail.c Mon Jul 12 21:01:43 2010 +++ metamail/metamail.c Mon Jul 12 21:06:16 2010
@@ -29,7 +29,7 @@ WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. @@ -20,6 +20,8 @@ WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
******************************************************* */
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -29,7 +31,7 @@ WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
#ifdef BORLAND #ifdef BORLAND
#define F_OK 0 #define F_OK 0
extern unsigned _stklen = 16384; 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" #define WRITE_BINARY "w"
#else /* BORLAND */ #else /* BORLAND */
#ifdef MICROSOFT #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; int retcode;
modpath(AUXPATH); 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"); tmproot = getenv("METAMAIL_TMPDIR");
if (!tmproot) tmproot="/tmp"; if (!tmproot) tmproot="/tmp";
mailheaders = getenv("MM_HEADERS"); mailheaders = getenv("MM_HEADERS");
@@ -1202,9 +1184,9 @@ char *SquirrelFile; @@ -1202,9 +1179,9 @@ char *SquirrelFile;
fprintf(outfp, "Content-type: %s", ContentType); fprintf(outfp, "Content-type: %s", ContentType);
for (j=0; j<CParamsUsed; ++j) { for (j=0; j<CParamsUsed; ++j) {
fprintf(outfp, " ; "); fprintf(outfp, " ; ");
@ -47,7 +70,7 @@ $OpenBSD: patch-metamail_metamail_c,v 1.3 2010/07/12 19:03:13 naddy Exp $
} }
fprintf(outfp, "\n\n"); fprintf(outfp, "\n\n");
TranslateInputToOutput(InputFP, outfp, EncodingCode, ContentType); TranslateInputToOutput(InputFP, outfp, EncodingCode, ContentType);
@@ -2022,7 +2004,7 @@ int ShowLeadingWhitespace; @@ -2022,7 +1999,7 @@ int ShowLeadingWhitespace;
if (lc2strcmp(charset, PrevCharset)) { if (lc2strcmp(charset, PrevCharset)) {
char *s2, *charsetinuse; char *s2, *charsetinuse;
@ -56,7 +79,7 @@ $OpenBSD: patch-metamail_metamail_c,v 1.3 2010/07/12 19:03:13 naddy Exp $
for (s2=PrevCharset; *s2; ++s2) { for (s2=PrevCharset; *s2; ++s2) {
if (isupper((unsigned char) *s2)) *s2 = tolower((unsigned char) *s2); if (isupper((unsigned char) *s2)) *s2 = tolower((unsigned char) *s2);
} }
@@ -2032,7 +2014,7 @@ int ShowLeadingWhitespace; @@ -2032,7 +2009,7 @@ int ShowLeadingWhitespace;
} }
} }
if (ecode == ENCODING_NONE) { if (ecode == ENCODING_NONE) {
@ -65,7 +88,7 @@ $OpenBSD: patch-metamail_metamail_c,v 1.3 2010/07/12 19:03:13 naddy Exp $
} else { } else {
/* What follows is REALLY bogus, but all my encoding stuff is pipe-oriented right now... */ /* What follows is REALLY bogus, but all my encoding stuff is pipe-oriented right now... */
MkTmpFileName(TmpFile); MkTmpFileName(TmpFile);
@@ -2489,14 +2471,14 @@ char *name; @@ -2489,14 +2466,14 @@ char *name;
{ {
#ifdef AMIGA #ifdef AMIGA
strcpy(name, "T:mmXXXXXX"); strcpy(name, "T:mmXXXXXX");

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-metamail_mmencode_c,v 1.1 2010/07/12 19:28:14 naddy Exp $
--- metamail/mmencode.c.orig Mon Jul 12 21:13:57 2010
+++ metamail/mmencode.c Mon Jul 12 21:14:12 2010
@@ -13,6 +13,7 @@ OF THIS MATERIAL FOR ANY PURPOSE. IT IS PROVIDED "AS
WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
*/
#include <stdio.h>
+#include <stdlib.h>
#include <config.h>
#ifdef MSDOS
#include <fcntl.h>

View File

@ -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 <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;

View File

@ -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.orig Mon Jan 31 23:23:14 1994
+++ metamail/splitmail.c Mon Jul 12 21:01:43 2010 +++ metamail/splitmail.c Mon Jul 12 21:18:21 2010
@@ -41,8 +41,8 @@ extern char *malloc(), *index(), *getmyname(); @@ -21,6 +21,8 @@ WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
******************************************************* */
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <config.h>
@@ -28,7 +30,7 @@ WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
#include <time.h>
#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 #define VERBOSEDELIVERYCMD VerboseDeliveryCmd
#else #else
extern char *getenv(); -extern char *getenv();
-#define NORMALDELIVERYCMD "/usr/lib/sendmail -t -oi" -#define NORMALDELIVERYCMD "/usr/lib/sendmail -t -oi"
-#define VERBOSEDELIVERYCMD "/usr/lib/sendmail -t -v -oi" -#define VERBOSEDELIVERYCMD "/usr/lib/sendmail -t -v -oi"
+#define NORMALDELIVERYCMD "/usr/sbin/sendmail -t -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 #endif
usageexit() { usageexit() {
@@ -194,7 +194,7 @@ char **argv; @@ -194,7 +195,7 @@ char **argv;
s = endofheader(from); /* would be index(from, '\n'), s = endofheader(from); /* would be index(from, '\n'),
but need to check for continuation lines */ but need to check for continuation lines */
*s = '\0'; *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, from);
strcat(SharedHeaders, "\n"); strcat(SharedHeaders, "\n");
} }
@@ -339,9 +339,10 @@ static char *SharedHeads[] = { @@ -339,9 +340,10 @@ static char *SharedHeads[] = {
NULL NULL
}; };
@ -33,7 +52,7 @@ $OpenBSD: patch-metamail_splitmail_c,v 1.3 2010/07/12 19:03:14 naddy Exp $
char **OrigID; char **OrigID;
{ {
int i; int i;
@@ -361,7 +362,7 @@ char **OrigID; @@ -361,7 +363,7 @@ char **OrigID;
} }
if (!ULstrcmp(s, "subject")) { if (!ULstrcmp(s, "subject")) {
*colon = ':'; *colon = ':';

View File

@ -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 <stdio.h>
+#include <stdlib.h>
#include "richlex.h"
#include "richset.h"