[cmake-developers] OpenBSD and srand()/rand() changes
Rolf Eike Beer
eike at sf-mail.de
Sun Dec 14 08:36:08 EST 2014
David Cole wrote:
> Sounds to me like the perfect thing to just ignore till the dust settles.
Yes, this will probably take a while until this shows up in a release version
of OpenBSD. But if this is not reverted then it will probably be a good idea
to have check for this in 3.2 ready so it will just work in the next release
of OpenBSD.
> And then, after that, if there's no srand/rand on OpenBSD....... Well...
> There will be, won't there?
There will be srand()/rand() on OpenBSD. It's just that srand() will be
ignored and rand() will return really random numbers if there has not been a
call to srand_deterministic() before, which will make rand() return the same
numbers as on other platforms.
The idea behind this API in OpenBSD is: if you are looking for the pseudo
numbers you need to call srand_deterministic(), i.e. you must explicitely
state that you want the not really random random numbers. Everyone else will
get real random.
Eike
--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20141214/5a0073fc/attachment.sig>
More information about the cmake-developers
mailing list