freebsd-skq/lib
Andrey A. Chernov 476d9314d6 1) POSIX requires rand(3) return values to be in the [0, RAND_MAX] range,
but ACM formula we use have internal state (and return value) in the
[1, 0x7ffffffe] range, so our RAND_MAX (0x7fffffff) is never reached
because it is off by one, zero is not reached too.

Correct both RAND_MAX and rand(3) return value, shifting last one
to the 0 by 1 subtracted, resulting POSIXed [0, 0x7ffffffd(=new RAND_MAX)]
range.

2) Add a checks for not overflowing on too big seeds. It may happens on
the machines, where sizeof(unsigned int) > 32 bits.

Reviewed by:    bde [1]
MFC after:      2 weeks
2013-07-03 21:21:54 +00:00
..
atf
bind
clang Upgrade our copy of llvm/clang to 3.3 release. 2013-06-12 18:48:53 +00:00
csu Add a makefle that recurses into the right architecture-specific 2013-05-21 17:47:53 +00:00
libalias
libarchive
libauditd
libbegemot
libblocksruntime
libbluetooth
libbsm
libbsnmp
libbz2
libc 1) POSIX requires rand(3) return values to be in the [0, RAND_MAX] range, 2013-07-03 21:21:54 +00:00
libc++
libcalendar
libcam Fix a typo: XPORT_SPI should be tested against transport, nor protocol. 2013-06-03 21:52:19 +00:00
libcom_err
libcompat
libcompiler_rt Build __clear_cache on ARM with clang now it supports it. 2013-06-15 12:16:27 +00:00
libcrypt
libcxxrt
libdevinfo
libdevstat
libdwarf When decoding SLEB128, make sure sign extension is performed for 2013-06-30 21:06:47 +00:00
libedit
libefi
libelf
libexpat
libfetch Fix -Wunsequenced warning. 2013-06-29 15:51:27 +00:00
libgeom
libgpib
libgssapi
libiconv
libiconv_modules As a followup to r252547, propate const down the call stack. 2013-07-03 18:27:45 +00:00
libipsec Improve compatibility with recent flex from flex.sourceforge.net. 2013-05-03 23:51:32 +00:00
libipx
libjail
libkiconv
libkse
libkvm Switch to 2-clause license and standard text 2013-06-06 21:09:27 +00:00
libldns
liblzma
libmagic
libmandoc
libmd
libmemstat Refine UMA bucket allocation to reduce space consumption and improve 2013-06-18 04:50:20 +00:00
libmilter
libmp
libnandfs
libnetbsd
libnetgraph
libngatm
libopie
libpam
libpcap MFV: libpcap 1.4.0. 2013-05-30 08:02:00 +00:00
libpmc Always install pmc.foo(3) manpages. 2013-05-03 08:20:10 +00:00
libproc
libprocstat - Trim an unused and bogus Makefile for mount_smbfs. 2013-06-28 21:00:08 +00:00
libradius mdoc sweep. 2013-05-12 22:22:12 +00:00
librpcsec_gss
librpcsvc
librt Convert this piece of code to use C11 atomics. 2013-06-30 08:59:33 +00:00
librtld_db
libsbuf
libsdp
libsm
libsmb
libsmdb
libsmutil
libstand Move pos++ out of the complicated equation, introduced at r240780. 2013-07-01 17:23:13 +00:00
libstdbuf
libstdthreads
libtacplus mdoc sweep. 2013-05-12 22:22:12 +00:00
libtelnet
libthr The SUSv4tc1 requires that pthread_setcancelstate() shall be not a 2013-06-19 04:47:41 +00:00
libthread_db
libufs
libugidfw
libulog
libusb Add libusb_get_port_numbers 2013-06-07 13:45:58 +00:00
libusbhid
libutil Fix -Wunsequenced warning 2013-06-29 15:52:48 +00:00
libvgl
libvmmapi
libwrap
liby
libyaml
libypclnt
libz MFV: Update zlib to 1.2.8. 2013-05-05 06:20:49 +00:00
msun Make the order of operations for lib/msun more clear. 2013-06-24 19:12:17 +00:00
ncurses Convert old make variable modifiers :U and :L to bmake :tu and :tl. 2013-06-02 11:44:23 +00:00
Makefile - Trim an unused and bogus Makefile for mount_smbfs. 2013-06-28 21:00:08 +00:00
Makefile.inc