$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: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; -extern char *mktemp(char *); +extern char *mkstemp(char *); #define WRITE_BINARY "w" #else /* BORLAND */ #ifdef MICROSOFT @@ -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); -#ifndef MSDOS - signal(SIGINT, cleanup); -#ifndef AMIGA - signal(SIGILL, cleanup); - signal(SIGTRAP, cleanup); - signal(SIGIOT, cleanup); - signal(SIGFPE, cleanup); -#ifndef LINUX - signal(SIGEMT, cleanup); - signal(SIGBUS, cleanup); -#endif - signal(SIGSEGV, cleanup); - signal(SIGTERM, cleanup); -#endif -#endif -#ifdef SIGXCPU - signal(SIGXCPU, cleanup); -#endif tmproot = getenv("METAMAIL_TMPDIR"); if (!tmproot) tmproot="/tmp"; mailheaders = getenv("MM_HEADERS"); @@ -1202,9 +1179,9 @@ char *SquirrelFile; fprintf(outfp, "Content-type: %s", ContentType); for (j=0; j