Date: Sun, 25 Feb 2001 08:43:54 +0100 From: J Wunsch <j@uriah.heep.sax.de> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: ports/astro/xglobe/files patch-random Message-ID: <20010225084353.A21830@uriah.heep.sax.de> In-Reply-To: <20010224202345.A15392@mollari.cthul.hu>; from kris@obsecurity.org on Sat, Feb 24, 2001 at 08:23:45PM -0800 References: <200102250306.f1P36eY37040@freefall.freebsd.org> <Pine.NEB.3.96L.1010224225440.85229W-100000@fledge.watson.org> <20010224202345.A15392@mollari.cthul.hu>
next in thread | previous in thread | raw e-mail | index | archive | help
As Kris Kennaway wrote: > How about this also: > static u_long next = 1; > + > +__warn_references(rand, > + "warning: rand() does not produce high-quality random numbers and should not generally be used"); Objected. rand() is the ANSI/ISO interface, random() is non-standard und thus unportable. Standard and portable programs should not cause warnings. The IMHO better way would be to make rand() use random()'s algorithm, while retaining the standard-mandated calling interface. Ship the existing rand()/srand() functions either as orand()/osrand() or perhaps in libcompat for those who insist that they need the old algorithm for 20-year old regression test scripts to behave predictably the same way they did all the previous 20 years. -- cheers, J"org .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/ NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010225084353.A21830>