Date: Sat, 24 Feb 2001 20:23:45 -0800 From: Kris Kennaway <kris@obsecurity.org> To: Robert Watson <rwatson@FreeBSD.org> Cc: Nick Sayer <nsayer@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: ports/astro/xglobe/files patch-random Message-ID: <20010224202345.A15392@mollari.cthul.hu> In-Reply-To: <Pine.NEB.3.96L.1010224225440.85229W-100000@fledge.watson.org>; from rwatson@FreeBSD.org on Sat, Feb 24, 2001 at 10:55:24PM -0500 References: <200102250306.f1P36eY37040@freefall.freebsd.org> <Pine.NEB.3.96L.1010224225440.85229W-100000@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Sat, Feb 24, 2001 at 10:55:24PM -0500, Robert Watson wrote: > Hmm. I thought there was a BUGS section in rand(3), but apparently not -- > I must be thinking of some other operating system. We need to add one, > and I'm surprised there isn't one already. How about this also: Index: stdlib/rand.c =================================================================== RCS file: /mnt/ncvs/src/lib/libc/stdlib/rand.c,v retrieving revision 1.2 diff -u -r1.2 rand.c --- stdlib/rand.c 1999/05/24 23:30:12 1.2 +++ stdlib/rand.c 2001/02/25 04:13:07 @@ -50,6 +50,8 @@ return ((*ctx = *ctx * 1103515245 + 12345) % ((u_long)RAND_MAX + 1)); } +__warn_references(rand_r, + "warning: rand_r() does not produce high-quality random numbers and should not generally be used"); int rand_r(unsigned int *ctx) @@ -61,6 +63,9 @@ static u_long next = 1; + +__warn_references(rand, + "warning: rand() does not produce high-quality random numbers and should not generally be used"); int rand() Kris [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE6mIjQWry0BWjoQKURAvflAJ4qNngLSD/w2mxpB4ZcO313nZqK6wCfe6NB tP/M4il8X8dAsA6iWh2+HBo= =UlhU -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010224202345.A15392>
