]> git.sesse.net Git - vlc/commit
nrand48 replacement
authorRémi Denis-Courmont <remi@remlab.net>
Fri, 5 Mar 2010 22:03:27 +0000 (00:03 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Fri, 5 Mar 2010 22:03:27 +0000 (00:03 +0200)
commit6268a229b1091c361b17028d3d54417190c791e0
treeef62ad550b537f46936201f1495bbe42fe21948f
parent392d0b532638ffa2e2c3890c79bbd07adb238a4d
nrand48 replacement

This is the POSIX linear congruential pseudo-random generator with
48-bits of state. It is non-secure/reproducible and thread-safe.
rand() is not thread-safe and *ahem* must not be used in VLC code.
rand_r() is thread-safe but obsoleted in POSIX.2008.

For secure random numbers, use the slower vlc_rand_bytes().
vlc_rand_bytes() can also be used to generate the seed if you are short
on idea for a 48-bits pseudo-random value.
compat/nrand48.c [new file with mode: 0644]
configure.ac
include/vlc_fixups.h