toolchain stuff

Robert Connolly robert at
Wed Jun 6 04:48:07 PDT 2007

And then, it's come to my attention that glibc does not provide mkstemps(). 
mkstemps() is a bsd library function. This is like mkstemp() except that you 
can specify a suffix to the file name, in the form 
of /tmp/tmpXXXXXXXXXXsuffix.

This is not terribly usefull, except that libiberty/gcc/binutils use mkstemps, 
and they use gettimeofday/getpid for entropy unless mkstemps() is provided by 

Perl, KDE, and certainly others, also use mkstemps(), and if it's not in libc 
they tend to use their own version which tends to use gettimeofday().

mkstemps() is the only one in the mktemp() family that uses a suffix argument. 
This poses a problem in glibc and uclibc because their gen_tempname function, 
used by the mktemp() family, does not support a suffix argument.

Making binutils/gcc/libiberty's mkstemps() use arc4random, or /dev/urandom, is 
not a problem. But for all the rest it would be best to add it to libc, and 
the easiest way to do that is to delete glibc's mktemp() family and replace 
it with bsd's.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <>

More information about the hlfs-dev mailing list