Re: win32 random number generator

From: "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-patches(at)postgresql(dot)org>, <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: win32 random number generator
Date: 2005-08-23 12:14:21
Message-ID: 6EE64EF3AB31D5448D0007DD34EEB3417DD177@Herge.rcsinc.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers-win32 pgsql-patches

> "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com> writes:
> > Looks like this in lrand48(void):
_rand48_seed[1] > 1);

> > _rand48_seed[1] >> 1);
^^

The problem is the shift operator :). Anyways I double checked the
results and it works as expected now so here's a patch. I also removed
the spurious casts.

Merlin

Attachment Content-Type Size
fix_random.diff application/octet-stream 353 bytes

Responses

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Tom Lane 2005-08-23 13:26:16 Re: win32 random number generator
Previous Message Claudio Natoli 2005-08-23 05:13:42 Re: win32 random number generator

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2005-08-23 12:53:38 Re: PL/Perl embedding string common elements
Previous Message Magnus Hagander 2005-08-23 10:28:35 Re: Win32 unicode vs ICU