freebsd-dev/lib/libc
Conrad Meyer 672e12255d rand(3): Replace implementation with one backed by random(3) algorithm
rand(3)'s standard C API is extremely limiting, but we can do better
than the historical 32-bit state Park-Miller LCG we've shipped since
2001: r73156.

The justification provided at the time for not using random(3) was that
rand_r(3) could not be made to use the same algorithm.  That is still
true.  However, the irrelevance of rand_r(3) is increasingly obvious.
Since that time, POSIX has marked the interface obsolescent.  rand_r(3)
never became part of the standard C library.  If not for API
compatibility reasons, I would just remove rand_r(3) entirely.

So, I do not believe it is a problem for rand_r(3) and rand(3) to
diverge.

The 12 ABI is maintained with compatibility definitions, but this
revision does subtly change the API of rand(3).  The sequences of
pseudorandom numbers produced in programs built against new versions of
libc will differ from programs built against prior versions of libc.

Reviewed by:	kevans, markm
MFC after:	no
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D23290
2020-02-01 20:33:23 +00:00
..
aarch64
amd64 amd64: sync up libc memcmp with the kernel version (r357309) 2020-01-30 19:57:05 +00:00
arm arm/ffs.S: remove stale comment. 2019-12-28 02:11:41 +00:00
capability
compat-43 Adjust history, info source from v1's manuals 2019-09-04 13:44:46 +00:00
db
gdtoa
gen libc: remove forward compat added in r356830 for F_ISUNIONSTACK 2020-01-29 01:52:27 +00:00
gmon
i386 remove obsolete i386 MD memchr implementation 2019-09-25 16:49:22 +00:00
iconv libc: correct iconv buffer overflow 2019-07-02 23:56:37 +00:00
include Add linux-compatible memfd_create 2019-09-25 18:03:18 +00:00
inet
isc
locale libc: Fix a few bugs in the xlocale collation code. 2020-01-09 20:49:26 +00:00
md
mips mips: fix some mcount nits 2019-09-02 01:55:55 +00:00
nameser Bounds check again after advancing cp, otherwise we have a possible 2019-09-05 19:35:30 +00:00
net Increase YPMAXRECORD to 16M to be compatible with Linux. 2019-08-12 20:27:33 +00:00
nls
posix1e
powerpc [PowerPC] Fix typo in _ctx_start on ppc32 2019-11-23 23:41:21 +00:00
powerpc64 [PPC64] memcpy/memmove/bcopy optimization 2020-01-15 20:25:52 +00:00
powerpcspe [PowerPC] Fix SPE floating point environment manipulation 2019-12-12 17:12:18 +00:00
quad Revert r351078, r351085: stand/quad.h eviction 2019-08-15 17:15:32 +00:00
regex lib/libc/regex: fix build with REDEBUG defined 2019-09-24 12:21:01 +00:00
resolv
riscv Use "far" calls and branches so that lld uses valid relocations. 2019-12-04 21:01:13 +00:00
rpc Increase YPMAXRECORD to 16M to be compatible with Linux. 2019-08-12 20:27:33 +00:00
secure ssp: knock out some trivial warnings that come up with WARNS=6 2020-01-04 20:07:11 +00:00
softfloat
sparc64
stdio stdio: provide _unlocked variants of fflush, fputc, fputs, fread, fwrite 2020-01-30 03:31:16 +00:00
stdlib rand(3): Replace implementation with one backed by random(3) algorithm 2020-02-01 20:33:23 +00:00
stdtime
string [PPC64] strncpy optimization 2020-01-15 19:53:03 +00:00
sys vfs: provide F_ISUNIONSTACK as a kludge for libc 2020-01-17 14:42:25 +00:00
tests Add qsort_r(3) regression test. 2020-01-20 11:45:18 +00:00
uuid
x86
xdr
yp Increase the size of the send and receive buffers for YP client rpc 2019-09-16 06:42:01 +00:00
libc_nossp.ldscript
libc.ldscript
Makefile
Makefile.depend Update Makefile.depend files 2019-12-11 17:37:53 +00:00
Makefile.depend.options Update libssp paths in various Makefile.depend* files 2020-01-06 18:15:55 +00:00
Versions.def