summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/random.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Use sysctl(KERN_ARND) to get n bytes, instead of just 4 at a timeotto2005-11-301-38/+11
| | | | | | | and remove fallback code. If somebody is dumb enough to make the sysctl fail using systrace, he deserves what he gets. Saves 7 syscalls on process startup. looks good miod@ ok deraadt@ tedu@
* zap remaining rcsid.espie2005-08-081-4/+1
| | | | | | Kill old files that are no longer compiled. okay theo
* ansi + de-registerpat2005-03-301-11/+6
| | | | ok otto deraadt
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* Use int32_t, not long since this deals with 32bit quantities.millert2003-02-281-20/+20
| | | | Inspired by a change in NetBSD and reported by Jan Johansson.
* In srandomdev(), if we can't access /dev/arandom, use the sysctl() instead.millert2002-12-061-10/+27
| | | | | We don't want to use the sysctl() by default since we are reading more than just a few bytes of entropy when setting up the state.
* Fix the leak for real (that's what I get for hacking when i can't sleep).millert2000-04-041-5/+7
|
* Fix an fd leak if the read from /dev/arandom fails. Pointed out bymillert2000-04-041-5/+5
| | | | Markus Friedl.
* Add srandomdev() from FreeBSD for use by sendmail and others.millert2000-04-031-1/+46
|
* More XPG4.2 --millert1998-02-071-9/+5
| | | | | setstate takes a const parameter don't ever spew to stderr, just return NULL
* size_t n in initstate(); XPGderaadt1998-02-061-2/+2
|
* Remove dead codetholo1996-09-151-3/+2
| | | | | | Remove unused variables Silence some warnings lint(1) is your friend
* Fix RCS idstholo1996-08-191-2/+1
| | | | Make sure everything uses {SYS,}LIBC_SCCS properly
* Substantially improve random number generation by using the largest primetholo1996-03-301-9/+21
| | | | | that fits inside 32 bits as the denominator; take care not to overflow. Regenerate initial seed after replacing the generator
* initial import of NetBSD treederaadt1995-10-181-0/+364