openbsd-ports/editors/xemacs21/patches/patch-lib-src_movemail_c
sturm a42f69f618 update to xemacs 21.4.15
based on a diff from Gregory Steuck <greg at y2004.nest.cx>
2004-06-24 17:21:49 +00:00

20 lines
632 B
Plaintext

$OpenBSD: patch-lib-src_movemail_c,v 1.1 2004/06/24 17:21:49 sturm Exp $
--- lib-src/movemail.c.orig Tue Jun 22 20:58:40 2004
+++ lib-src/movemail.c Tue Jun 22 21:00:52 2004
@@ -588,14 +588,12 @@ lock_dot(char *filename)
p--;
*p = 0;
strcpy (p, "EXXXXXX");
- mktemp (tempname);
- unlink (tempname);
for (;;)
{
/* Create the lock file, but not under the lock file name. */
/* Give up if cannot do that. */
- desc = open (tempname, O_WRONLY | O_CREAT | O_EXCL, 0666);
+ desc = mkstemp (tempname);
if (desc < 0)
{
char *message = (char *) xmalloc (strlen (tempname) + 50);