Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Feb 2001 03:17:57 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        roam@orbitel.bg (Peter Pentchev)
Cc:        ache@nagual.pp.ru (Andrey A. Chernov), n@nectar.com (Jacques A. Vidrine), arch@FreeBSD.ORG, kris@obsecurity.org
Subject:   Re: rand.c patch for review (was: Re: cvs commit: ports/astro/xglobe/files patch-random)
Message-ID:  <200102270317.UAA09690@usr05.primenet.com>
In-Reply-To: <20010226174852.B435@ringworld.oblivion.bg> from "Peter Pentchev" at Feb 26, 2001 05:48:53 PM

next in thread | previous in thread | raw e-mail | index | archive | help
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102270317.UAA09690>