[patch] use mkstemp instead of mktemp.

Alan Modra amodra@bigpond.net.au
Wed Jul 2 02:37:00 GMT 2003


On Tue, Jul 01, 2003 at 07:16:30PM -0700, Muthukumar Ratty wrote:
> > <URL:http://sources.redhat.com/ml/binutils/2003-03/msg00219.html>.
> >
> > This is turning into a FAQ, though infrequent enough that I
> > believe people may forget why.  Perhaps adding an obvious
> > comment at the mktemp call site would help.
> >
> 
> that sure would keep off some newbie trying it (like me:)

Don't give up.  Recent versions of glibc provide mkdtemp, so you could
use that.  The complication is that you'd need to add an autoconf test
for mkdtemp (see AC_CHECK_FUNCS) and fall back to using mktemp if
mkdtemp isn't available.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list