random, srandom, and initstate

Joel Sherrill joel.sherrill@oarcorp.com
Thu May 20 05:47:00 GMT 2010


Hi,

I have been looking around for an implementation
to port to newlib.  This is a link to the
FreeBSD version.

http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/src/lib/libc/stdlib/random.c?rev=1.25.12.1;content-type=text%2Fplain

It is OK license-wise.  But I was curious if

(1) It's use of /dev/random and gettimeofday
     as possible seed sources can be accomodated
     in newlib.  Probably need to be disabled
     via some conditional compilation.

(2) Should I go ahead and modify them to be
     the _r versions and have the non-_r version
     call those with static variables?

-- 
Joel Sherrill, Ph.D.             Director of Research&  Development
joel.sherrill@OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
    Support Available             (256) 722-9985




More information about the Newlib mailing list