--- nrand48.c.orig 2003-05-20 15:21:02.000000000 -0700 +++ nrand48.c 2005-11-03 13:43:51.000000000 -0800 @@ -19,6 +19,7 @@ long nrand48(unsigned short xseed[3]) { - _dorand48(xseed); - return ((long) xseed[2] << 15) + ((long) xseed[1] >> 1); + uint48 tmp; + DORAND48(tmp, xseed); + return (tmp >> 17) & 0x7fffffff; }