Fix mkstemp implementation
When closing the file handle obtained from mkstemp(), the file
ought _not_ to be deleted.
Patch by Jan Engelhardt <jengelh@inai.de>
(cherry picked from commit 76119a8e8938dd23cdb4fe72843723fe4d4cc121)
diff --git a/mingw-w64-crt/misc/mkstemp.c b/mingw-w64-crt/misc/mkstemp.c
index d3c4aad..c78b7c5 100644
--- a/mingw-w64-crt/misc/mkstemp.c
+++ b/mingw-w64-crt/misc/mkstemp.c
@@ -48,7 +48,7 @@
template_name[j] = letters[rand () % 62];
}
fd = _sopen(template_name,
- _O_RDWR | _O_CREAT | _O_EXCL | _O_TEMPORARY | _O_BINARY,
+ _O_RDWR | _O_CREAT | _O_EXCL | _O_BINARY,
_SH_DENYRW, _S_IREAD | _S_IWRITE);
if (fd != -1) return fd;
if (fd == -1 && errno != EEXIST) return -1;