summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/random.3 (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Some people still argue that rand(3) and random(3) have suitable deterministicderaadt2021-02-121-2/+5
| | | | | | | | | | | use cases, so explain the situation a bit more. Since the 80's, I estimate around 5 algorithm changes, so any chosen seed is unrepeatable UB. +The deterministic sequence algorithm changed a number of times since +original development, is underspecified, and should not be relied upon to +remain consistent between platforms and over time. ok jmc kettenis
* Xr and Ox fixes;jmc2014-12-091-4/+6
|
* Change rand(), random(), drand48(), lrand48(), mrand48(), and srand48()deraadt2014-12-081-54/+56
| | | | | | | | | | | | | | | | | to returning strong random by default, source from arc4random(3). Parameters to the seeding functions are ignored, and the subsystems remain in strong random mode. If you wish the standardized deterministic mode, call srand_deterministic(), srandom_determistic(), srand48_deterministic(), seed48_deterministic() or lcong48_deterministic() instead. The re-entrant functions rand_r(), erand48(), nrand48(), jrand48() are unaffected by this change and remain in deterministic mode (for now). Verified as a good roadmap forward by auditing 8800 pieces of software. Roughly 60 pieces of software will need adaptation to request the deterministic mode. Violates POSIX and C89, which violate best practice in this century. ok guenther tedu millert
* Don't describe random() as "better".millert2014-11-251-5/+5
| | | | | Remove the bug about rand() being faster. Add a bug about historical implementations seeding very poorly.
* zap trailing whitespace;jmc2014-07-181-3/+3
|
* it is 2014, and we still need to encourage people away from srand()deraadt2014-07-171-2/+8
| | | | and random(). Sigh.
* oops, i deleted the wrong wordtedu2014-07-131-2/+2
|
* remove a lie spotted by guenthertedu2014-07-131-5/+4
|
* Use the fancy .In macro for includes. From Jan Klemkow. ok jmc schwarzetedu2013-06-051-3/+3
|
* Improve standards conformance: ecvt(), fcvt(), gcvt(), mktemp(), ttyslot(),guenther2012-06-011-3/+3
| | | | | | | and valloc() are not in the current version, while posix_memalign() mkstemp(), and mkdtemp() are, and setstate()'s argument has lost a bogus 'const'. ok millert@ jmc@ espie@ kettenis@; ports build testing by naddy@
* convert to new .Dd format;jmc2007-05-311-2/+2
|
* Use sysctl(KERN_ARND) to get n bytes, instead of just 4 at a timeotto2005-11-301-4/+3
| | | | | | | 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@
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* - section reorderjmc2003-06-011-3/+3
| | | | | - merge COMPATIBILITY - kill whitespace at EOL
* typos;jmc2003-05-101-4/+4
|
* Initial idea from aaron@: Last char of .Xr group in SEE ALSO section shouldmpech2001-09-061-2/+2
| | | | | | be a single digit. Powered by mantoya@. millert@ ok.
* remove confusing comparison with srand (it does not return the old seed)assar2001-06-091-11/+3
| | | | use .Sh AUTHORS and .An for author
* Flesh out stdlib function man pages.aaron2000-04-201-17/+22
|
* Add srandomdev() from FreeBSD for use by sendmail and others.millert2000-04-031-2/+23
|
* Max value returned is 2^31 - 1, regardless of the arch-dependent LONG_MAX.pjanzen2000-01-191-7/+1
|
* trash some old leftover macros and replace them with -mdoc macrosaaron1999-07-041-9/+4
|
* first round of repairs on stdlibaaron1999-06-291-7/+7
|
* remove argument from .Os macros so value in /usr/share/tmac/mdoc/doc-commonaaron1999-05-231-2/+2
| | | | is used instead; kwesterback@home.com
* add .Xr's for all the random functions in libcmillert1998-07-051-1/+2
|
* More XPG4.2 --millert1998-02-071-4/+14
| | | | | setstate takes a const parameter don't ever spew to stderr, just return NULL
* size_t n in initstate(); XPGderaadt1998-02-061-2/+2
|
* Fix RCS idstholo1996-08-191-2/+1
| | | | Make sure everything uses {SYS,}LIBC_SCCS properly
* document largest possible value; netbsd pr#2338; from ↵deraadt1996-05-041-1/+7
| | | | banshee@gabriella.resort.com
* initial import of NetBSD treederaadt1995-10-181-0/+167