From owner-cvs-all Sat Feb 24 20:23:52 2001 Delivered-To: cvs-all@freebsd.org Received: from obsecurity.dyndns.org (adsl-63-207-60-218.dsl.lsan03.pacbell.net [63.207.60.218]) by hub.freebsd.org (Postfix) with ESMTP id 7452037B491; Sat, 24 Feb 2001 20:23:46 -0800 (PST) (envelope-from kris@obsecurity.org) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id F38D966B26; Sat, 24 Feb 2001 20:23:45 -0800 (PST) Date: Sat, 24 Feb 2001 20:23:45 -0800 From: Kris Kennaway To: Robert Watson Cc: Nick Sayer , 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> References: <200102250306.f1P36eY37040@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="tThc/1wpZn/ma/RB" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from rwatson@FreeBSD.org on Sat, Feb 24, 2001 at 10:55:24PM -0500 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --tThc/1wpZn/ma/RB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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 =3D *ctx * 1103515245 + 12345) % ((u_long)RAND_MAX + 1)); } =20 +__warn_references(rand_r, + "warning: rand_r() does not produce high-quality random numbers and shoul= d not generally be used"); =20 int rand_r(unsigned int *ctx) @@ -61,6 +63,9 @@ =20 =20 static u_long next =3D 1; + +__warn_references(rand, + "warning: rand() does not produce high-quality random numbers and should = not generally be used"); =20 int rand() Kris --tThc/1wpZn/ma/RB Content-Type: application/pgp-signature Content-Disposition: inline -----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----- --tThc/1wpZn/ma/RB-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message