mirror of
https://github.com/postgres/postgres.git
synced 2025-08-05 07:41:25 +03:00
Portability hack for pg_global_prng_state.
PGDLLIMPORT is only appropriate for variables declared in the backend, not when the variable is coming from a library included in frontend code. (This isn't a particularly nice fix, but for now, use the same method employed elsewhere.) Discussion: https://postgr.es/m/E1mrWUD-000235-Hq@gemulon.postgresql.org
This commit is contained in:
@@ -26,7 +26,11 @@ typedef struct pg_prng_state
|
|||||||
* Callers not needing local PRNG series may use this global state vector,
|
* Callers not needing local PRNG series may use this global state vector,
|
||||||
* after initializing it with one of the pg_prng_...seed functions.
|
* after initializing it with one of the pg_prng_...seed functions.
|
||||||
*/
|
*/
|
||||||
|
#ifndef FRONTEND
|
||||||
extern PGDLLIMPORT pg_prng_state pg_global_prng_state;
|
extern PGDLLIMPORT pg_prng_state pg_global_prng_state;
|
||||||
|
#else
|
||||||
|
extern pg_prng_state pg_global_prng_state;
|
||||||
|
#endif
|
||||||
|
|
||||||
extern void pg_prng_seed(pg_prng_state *state, uint64 seed);
|
extern void pg_prng_seed(pg_prng_state *state, uint64 seed);
|
||||||
extern void pg_prng_fseed(pg_prng_state *state, double fseed);
|
extern void pg_prng_fseed(pg_prng_state *state, double fseed);
|
||||||
|
Reference in New Issue
Block a user