Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Feb 2001 17:48:53 +0200
From:      Peter Pentchev <roam@orbitel.bg>
To:        "Andrey A. Chernov" <ache@nagual.pp.ru>
Cc:        "Jacques A. Vidrine" <n@nectar.com>, 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:  <20010226174852.B435@ringworld.oblivion.bg>
In-Reply-To: <20010226024456.A61566@nagual.pp.ru>; from ache@nagual.pp.ru on Mon, Feb 26, 2001 at 02:44:58AM %2B0300
References:  <20010225193409.A56351@nagual.pp.ru> <20010225131002.A38192@mollari.cthul.hu> <20010225132152.A39554@mollari.cthul.hu> <20010226005004.B59772@nagual.pp.ru> <20010225135429.A47615@mollari.cthul.hu> <20010226020827.A61007@nagual.pp.ru> <20010225151519.A63582@mollari.cthul.hu> <20010226022902.A61216@nagual.pp.ru> <20010225173445.A37510@spawn.nectar.com> <20010226024456.A61566@nagual.pp.ru>

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?)

G'luck,
Peter

-- 
When you are not looking at it, this sentence is in Spanish.

On Mon, Feb 26, 2001 at 02:44:58AM +0300, Andrey A. Chernov wrote:
> On Sun, Feb 25, 2001 at 17:34:45 -0600, Jacques A. Vidrine wrote:
> > On Mon, Feb 26, 2001 at 02:29:03AM +0300, Andrey A. Chernov wrote:
> > > As manpage says:
> > > "The rand_r() function is as proposed in the POSIX.4a Draft #6 document"
> > > Does anybody knows is there new versions of this draft exists and what
> > > they say?
> > 
> > I don't, but does this help?
> > 
> >   http://www.opengroup.org/onlinepubs/007908799/xsh/rand.html
> 
> It refers to POSIX Threads Extension (1003.1c-1995) for rand_r(), saying
> the same.
> 
> It seems we can't separate rand() and rand_r() since it will be very
> strange when rand_r() will produce different sequence than plain rand().

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?20010226174852.B435>