1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00
freebsd/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 Update to 9.8.4-P2 2013-03-27 10:11:43 +00:00
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 MFV r248590,248594: 2013-03-22 13:36:03 +00:00
libauditd
libbegemot
libblocksruntime
libbluetooth
libbsm
libbsnmp Add missing DPADD 2013-01-01 18:29:25 +00:00
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 Add several missing symbols to libcxxrt's symbol version map, and remove 2013-02-03 20:40:41 +00:00
libdevinfo
libdevstat New devstat metrics for devstat_compute_statistics(): 2012-12-15 18:19:48 +00:00
libdwarf When decoding SLEB128, make sure sign extension is performed for 2013-06-30 21:06:47 +00:00
libedit libedit: Revert r247683 to fix buildworld. 2013-03-03 14:42:15 +00:00
libefi
libelf Merge part of r1712 from elftoolchain, making it possible to resize ELF 2013-02-24 15:15:50 +00:00
libexpat Update base system libexpat to 2.1.0. 2013-02-26 00:58:44 +00:00
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 no one bothered to write the iconv.9 man page... If it appears we 2013-02-26 19:46:02 +00:00
libkse
libkvm Switch to 2-clause license and standard text 2013-06-06 21:09:27 +00:00
libldns Clean up. 2013-04-14 00:59:56 +00:00
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 Add libnetbsd, a thin compatibility layer intended to allow a limited 2012-12-21 20:37:38 +00:00
libnetgraph Fix for quite a special case when userland emulates a netgraph node, and 2013-03-11 13:05:11 +00:00
libngatm
libopie
libpam Backport upstream r684 (OPENPAM_DEBUG enables debugging macros but does 2013-04-14 16:49:27 +00:00
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 - Compute the correct size to reallocate when doubling the size of the 2013-01-28 15:48:31 +00:00
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 Add sbuf_start_section and sbuf_end_section to the libsbuf symbol map. 2013-04-11 19:50:10 +00:00
libsdp
libsm Since clang 3.2 now has an option to suppress warnings about implicitly 2013-02-16 20:17:31 +00:00
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 Remove deprecated APIs to get the total and free memory available to vmm.ko. 2013-04-25 20:42:21 +00:00
libwrap
liby
libyaml Add a stub manpage modeled over the libexpat one to explain to users not to use 2013-03-05 13:06:40 +00:00
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