openbsd-ports/mail/metamail/patches/patch-metamail_metamail_c
pvalchev 653d63b9e7 - getc() returns an int, not a char
- Rename patches with update-patches while here
2002-02-20 21:18:02 +00:00

56 lines
1.4 KiB
Plaintext

$OpenBSD: patch-metamail_metamail_c,v 1.1 2002/02/20 21:18:02 pvalchev Exp $
--- metamail/metamail.c.orig Wed Feb 20 14:06:43 2002
+++ metamail/metamail.c Wed Feb 20 14:06:43 2002
@@ -29,7 +29,7 @@ WITHOUT ANY EXPRESS OR IMPLIED WARRANTIE
#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
@@ -302,24 +302,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");
@@ -2489,14 +2471,14 @@ char *name;
{
#ifdef AMIGA
strcpy(name, "T:mmXXXXXX");
- mktemp(name);
+ close(mkstemp(name));
#else
#ifndef MSDOS
sprintf(name, "%s/mm.XXXXXX", tmproot);
- mktemp(name);
+ close(mkstemp(name));
#else
strcpy(name, "TXXXXXX");
- if (!mktemp(name))
+ if (!close(mkstemp(name)))
name[0] = 0;
else
if (DoDebug) printf("temp name = \"%s\"\n", name);