bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: new module 'random'


From: Jose E. Marchesi
Subject: Re: new module 'random'
Date: Sat, 14 Jan 2012 17:21:22 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

    While gnulib has a module 'random_r', it does not support random()
    portably.  I therefore had to recommend to the recutils author to
    use a different API, just for portability:
    <http://lists.gnu.org/archive/html/bug-recutils/2012-01/msg00011.html>

Note that my reason for preferring random to random_r in code which must
not be reentrant is the not documented requirement of memsetting the
random_data passed to initstate_r to zeroes.  Even if that trick works
with the current versions of glibc (and the random_r module from gnulib)
AFAIK nothing guarantees that it will work in the future.

    So here's a module that will guarantee the availability of random() and
    associated functions.

Great, thank you! :)

-- 
Jose E. Marchesi         http://www.jemarch.net
GNU Project              http://www.gnu.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]