[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gcl-devel] More Code Cleanup...
From: |
Brian Gough |
Subject: |
Re: [Gcl-devel] More Code Cleanup... |
Date: |
Thu, 20 Dec 2001 09:40:36 +0000 (GMT) |
Camm Maguire writes:
> > return mrand48 () | (mrand48 () << 32);
> > .......................^
>
> This looks a little alarming. It would appear that there is some
> fixed size misconfiguration going on. My 32 bit machine does not
> select this version of random.c, so I don't have this code in my
> build. Perhaps you can see what type mrand48 is declared, and why the
> code thinks it can shift it be 32 bits. (It would seem that a 48bit
> object would be a likely candidate. But apparently the compiler does
> not agree.)
In an old version of the GNU C Library there was a bug that caused
mrand48() to return only the lower bits of the result. It got into a
Red Hat release at one point and therefore became quite widespread.
This looks like it might be some sort of workaround for that.
regards
--
Brian Gough
----------------------------------------------------------------------
Network Theory Ltd Phone: +44 (0)117 3179309
15 Royal Park WWW: http://www.network-theory.co.uk/
Clifton Email: address@hidden
Bristol BS8 3AL
----------------------------------------------------------------------