Skip to content

Commit 11b5000

Browse files
committed
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
1 parent 6fb7c5d commit 11b5000

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/include/common/pg_prng.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ typedef struct pg_prng_state
2626
* Callers not needing local PRNG series may use this global state vector,
2727
* after initializing it with one of the pg_prng_...seed functions.
2828
*/
29+
#ifndef FRONTEND
2930
extern PGDLLIMPORT pg_prng_state pg_global_prng_state;
31+
#else
32+
extern pg_prng_state pg_global_prng_state;
33+
#endif
3034

3135
extern void pg_prng_seed(pg_prng_state *state, uint64 seed);
3236
extern void pg_prng_fseed(pg_prng_state *state, double fseed);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy