voidwget_random_init(void)
Random API initialization, allocating/preparing the internal resources.
On systems with automatic library constructors, this function doesn't have to be called explicitly.
This function is not thread-safe.
voidwget_random_exit(void)
Random API deinitialization, free'ing all internal resources.
On systems with automatic library destructors, this function doesn't have to be called explicitly.
This function is not thread-safe.
intwget_random(void)Returns
Random value between 0 and RAND_MAX
This functions wraps around gnulib's random_r(). It performs a thread-safe seeding on the first use, if
not done before by wget_srandom();
voidwget_srandom(unsignedintseed)Parametersseed Value to seed the random generator
This functions wraps around srandom_r() to make a thread-safe seeding for wget_random().