From owner-cvs-all Sat Feb 24 22:27:32 2001 Delivered-To: cvs-all@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id AEBD237B401; Sat, 24 Feb 2001 22:27:27 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id RAA24676; Sun, 25 Feb 2001 17:27:20 +1100 Date: Sun, 25 Feb 2001 17:22:36 +1100 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Kris Kennaway Cc: Robert Watson , Nick Sayer , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: ports/astro/xglobe/files patch-random In-Reply-To: <20010224202345.A15392@mollari.cthul.hu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, 24 Feb 2001, Kris Kennaway wrote: > 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"); ... No. rand_r() should be generally used because it is standard. It is the implementor's fault that it is low-quality (unlike for gets(), which is broken as designed). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message