Re: pgsql: Replace random(), pg_erand48(), etc with a better PRNG API and a - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Replace random(), pg_erand48(), etc with a better PRNG API and a
Date
Msg-id 1140657.1638161878@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: Replace random(), pg_erand48(), etc with a better PRNG API and a  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-committers
I wrote:
> ... If so, we could perhaps
> fix it by doing

> #ifdef FRONTEND
> extern pg_prng_state pg_global_prng_state;
> #else
> extern PGDLLIMPORT pg_prng_state pg_global_prng_state;
> #endif

Ah, I now see the same hack being used in keywords.h and pg_bitutils.h,
so I'll go do that.  (Maybe we should invent a variant of PGDLLIMPORT
that can make this happen without as much code duplication?)

            regards, tom lane



pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: pgsql: Centralize timestamp computation of control file on updates
Next
From: Tom Lane
Date:
Subject: pgsql: Portability hack for pg_global_prng_state.