openbsd-ports/editors/vim/patches/patch-fileio_c
jasoni 99c20a42c3 - Update to patch level .08.
- Use better patchfile names.
2000-08-15 07:57:46 +00:00

24 lines
609 B
Plaintext

--- fileio.c.orig Wed Dec 15 06:28:21 1999
+++ fileio.c Sat Jan 29 01:28:22 2000
@@ -2990,6 +2990,7 @@
vim_tempname(extra_char)
int extra_char; /* character to use in the name instead of '?' */
{
+ int itmp_fd;
#ifdef WIN32
char szTempFile[_MAX_PATH+1];
char buf4[4];
@@ -3039,8 +3040,10 @@
STRCAT(itmp, TEMPNAME);
if ((p = vim_strchr(itmp, '?')) != NULL)
*p = extra_char;
- if (mktemp((char *)itmp) == NULL)
- continue;
+ if ((itmp_fd = mkstemp((char *)itmp)) == -1)
+ continue;
+ else
+ close(itmp_fd);
return vim_strsave(itmp);
}
}