From owner-freebsd-arch Mon Feb 26 19:18:12 2001 Delivered-To: freebsd-arch@freebsd.org Received: from smtp05.primenet.com (smtp05.primenet.com [206.165.6.135]) by hub.freebsd.org (Postfix) with ESMTP id 2D7C737B491 for ; Mon, 26 Feb 2001 19:18:08 -0800 (PST) (envelope-from tlambert@usr05.primenet.com) Received: (from daemon@localhost) by smtp05.primenet.com (8.9.3/8.9.3) id UAA12226; Mon, 26 Feb 2001 20:12:55 -0700 (MST) Received: from usr05.primenet.com(206.165.6.205) via SMTP by smtp05.primenet.com, id smtpdAAAuFaW0x; Mon Feb 26 20:12:49 2001 Received: (from tlambert@localhost) by usr05.primenet.com (8.8.5/8.8.5) id UAA09690; Mon, 26 Feb 2001 20:17:57 -0700 (MST) From: Terry Lambert Message-Id: <200102270317.UAA09690@usr05.primenet.com> Subject: Re: rand.c patch for review (was: Re: cvs commit: ports/astro/xglobe/files patch-random) To: roam@orbitel.bg (Peter Pentchev) Date: Tue, 27 Feb 2001 03:17:57 +0000 (GMT) Cc: ache@nagual.pp.ru (Andrey A. Chernov), n@nectar.com (Jacques A. Vidrine), arch@FreeBSD.ORG, kris@obsecurity.org In-Reply-To: <20010226174852.B435@ringworld.oblivion.bg> from "Peter Pentchev" at Feb 26, 2001 05:48:53 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Just thought I'd throw two cents before any patch is applied.. > > It seems that there are people who need the old rand() behavior. > How about isolating the old (current) rand(), srand(), rand_r() and > whatever else is needed, to a separate library (-lrand?), and > announce that programs that need old (traditional) rand() behavior > need to be linked against -lrand? > > (I hope that I'm correct in thinking that if -lrand is specified > on the linker cmdline, its rand() shall override the one in libc?) Yes, this would work. As I said before, I'd like the traditional behaviour, exhibited by UNIX systems other than a modified FreeBSD, to be default, but could live with this FreeBSD specific hack being necessary, where it wasn't necessary on all other UNIX systems. With respect to the idea that shared ELF binaries are supposed to be portable between ELF platforms soon/eventually, I guess setting the platfor specific OS_ABI flag for FreeBSD, and requiring a section causing librand.so to be loaded only for FreeBSD would work (though I can't see vendors rushing to add FreeBSD specific hacks to their code, and more than I can see them rushing to add HP specific hacks to handle pure virtual base class construction). I know of at least two games which depend on the random number generator producing repeatable results in order to have maps that are actually fully navigable. I rather doubt their vendors will carry around their own working generators so that their code will run on FreeBSD, if it runs on Linux without such hacks. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message