21 lines
508 B
Plaintext
21 lines
508 B
Plaintext
$OpenBSD: patch-io_c,v 1.1 2006/04/09 10:10:25 alek Exp $
|
|
--- io.c.orig Thu Mar 7 18:34:42 1996
|
|
+++ io.c Sun Apr 9 12:05:56 2006
|
|
@@ -1193,10 +1193,16 @@ tmpinit()
|
|
#endif
|
|
);
|
|
tfname = copystr(buf);
|
|
+#if 0
|
|
tfname = mktemp(tfname);
|
|
+#endif
|
|
#ifndef MSFILESYSTEM
|
|
+#if 1
|
|
+ tmpfd = mkstemp(tfname);
|
|
+#else
|
|
(void) close(creat(tfname, 0600));
|
|
tmpfd = open(tfname, 2);
|
|
+#endif
|
|
#else /* MSFILESYSTEM */
|
|
tmpfd = open(tfname, O_CREAT|O_EXCL|O_BINARY|O_RDWR, S_IWRITE|S_IREAD);
|
|
#endif /* MSFILESYSTEM */
|