From owner-cvs-all Sun Feb 25 0:52:38 2001 Delivered-To: cvs-all@freebsd.org Received: from mailg.telia.com (mailg.telia.com [194.22.194.26]) by hub.freebsd.org (Postfix) with ESMTP id 77A0037B401 for ; Sun, 25 Feb 2001 00:52:32 -0800 (PST) (envelope-from ertr1013@student.uu.se) Received: from d1o913.telia.com (d1o913.telia.com [195.252.44.241]) by mailg.telia.com (8.9.3/8.9.3) with ESMTP id JAA24257 for ; Sun, 25 Feb 2001 09:52:29 +0100 (CET) Received: from ertr1013.student.uu.se (h238n1fls20o913.telia.com [212.181.162.238]) by d1o913.telia.com (8.8.8/8.8.8) with SMTP id JAA05572 for ; Sun, 25 Feb 2001 09:52:29 +0100 (CET) Received: (qmail 77226 invoked by uid 1001); 25 Feb 2001 08:52:40 -0000 Date: Sun, 25 Feb 2001 09:52:40 +0100 From: Erik Trulsson To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: ports/astro/xglobe/files patch-random Message-ID: <20010225095240.A77183@student.uu.se> Mail-Followup-To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG References: <200102250640.f1P6e0q11960@earth.backplane.com> <20010224225935.A769@mollari.cthul.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010224225935.A769@mollari.cthul.hu>; from kris@obsecurity.org on Sat, Feb 24, 2001 at 10:59:35PM -0800 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sat, Feb 24, 2001 at 10:59:35PM -0800, Kris Kennaway wrote: > > Bruce's objection is on different grounds, and I'll think about how we > can improve rand() without breaking the standards. Actually, on that > matter, I have the suspicion that the rand() implementation (i.e. the > algorithm it uses) is standardized somewhere (one of the C > standards?). Bruce, can you confirm? > > Kris (I am not Bruce, but...) No, the algorithm of rand() is not standardized in the C standard. OTOH, there is an example of a portable implementation of rand() in the C standard and FreeBSD uses the same algorithm (as does many other implementations of rand()). This is probably what you were thinking of. As long as rand() and srand() behaves as describe in the man-page for rand(3) they confirm to the C standard. (Provided that RAND_MAX is at least 32767.) -- Erik Trulsson ertr1013@student.uu.se To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message