Date: Sun, 13 Dec 1998 10:06:19 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: DJ Delorie cc: djgpp-workers AT delorie DOT com Subject: mkstemp bug Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com I spotted this one while working on the /dev/x/foo testing: mkstemp won't replace the template with the name of the file it actually creates. Here's a patch: *** src/libc/compat/stdio/mkstemp.c~0 Sun Jun 28 23:27:22 1998 --- src/libc/compat/stdio/mkstemp.c Fri Dec 11 15:49:26 1998 *************** mkstemp (char *_template) *** 22,27 **** --- 22,29 ---- if (fd == -1) errno = ENOENT; + else + strcpy(_template, tmp_name); return fd; }