On Wed, Oct 29, 2008 at 11:22:08AM +0100, Jim Meyering wrote:
[random, random_r, RAND_MAX]
> However, what if an application wants only random_r?
> We shouldn't require that they import all of the non-thread-safe
> functions, too, so I think random really does belong separate.
> Of course, it depends on random_r no matter what.

This is for a putative platform which has random (and of course
RAND_MAX) but not random_r.  random_r must return random numbers in
the range [0..RAND_MAX-1] where RAND_MAX is defined by the platform,
but may not be the same as the RAND_MAX expected by the gnulib code.

> Perhaps then, random_r should not define RAND_MAX --
> define a new symbol, e.g., RANDOM_R_MAX instead.
> Then only the random module would define RAND_MAX.

That's a different API from the one described by the glibc
documentation ...

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v


Reply via email to