This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
random, srandom, and initstate
- From: Joel Sherrill <joel dot sherrill at oarcorp dot com>
- To: "newlib at sources dot redhat dot com" <newlib at sources dot redhat dot com>
- Date: Wed, 19 May 2010 13:40:30 -0500
- Subject: random, srandom, and initstate
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