Replace use of mkstemp with mkstemps, provided by libiberty.

This commit is contained in:
Nick Clifton 2001-11-14 11:56:41 +00:00
parent 86017ce918
commit a6a256529f
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2001-11-14 Nick Clifton <nickc@cambridge.redhat.com>
* bucomm.c (make_tempname): Use mkstemps instead of mkstemp, since
not all systems provide mkstemp.
2001-11-14 Alan Modra <amodra@bigpond.net.au> 2001-11-14 Alan Modra <amodra@bigpond.net.au>
* doc/binutils.texi (objdump): Document x86 -M options. * doc/binutils.texi (objdump): Document x86 -M options.

View File

@ -35,6 +35,9 @@
typedef long time_t; typedef long time_t;
#endif #endif
#endif #endif
/* Ought to be defined in libiberty.h... */
extern int mkstemps PARAMS ((char *, int));
/* Error reporting */ /* Error reporting */
@ -233,14 +236,14 @@ make_tempname (filename)
#endif #endif
strcat (tmpname, "/"); strcat (tmpname, "/");
strcat (tmpname, template); strcat (tmpname, template);
close (mkstemp (tmpname)); close (mkstemps (tmpname, 0));
*slash = c; *slash = c;
} }
else else
{ {
tmpname = xmalloc (sizeof (template)); tmpname = xmalloc (sizeof (template));
strcpy (tmpname, template); strcpy (tmpname, template);
close (mkstemp (tmpname)); close (mkstemps (tmpname, 0));
} }
return tmpname; return tmpname;
} }