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