aboutsummaryrefslogtreecommitdiff
path: root/src/include/common/pg_prng.h
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2021-11-29 11:00:00 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2021-11-29 11:00:00 -0500
commite04a8059a74c125a8af94acdcb7b15b92188470a (patch)
tree0be52ca72de433f2ff8f3eb5e43a517055cc209f /src/include/common/pg_prng.h
parent11b500072e42c214462b973b0b05f1c68992226b (diff)
downloadpostgresql-e04a8059a74c125a8af94acdcb7b15b92188470a.tar.gz
postgresql-e04a8059a74c125a8af94acdcb7b15b92188470a.zip
Simplify declaring variables exported from libpgcommon and libpgport.
This reverts commits c2d1eea9e and 11b500072, as well as similar hacks elsewhere, in favor of setting up the PGDLLIMPORT macro so that it can just be used unconditionally. That can work because in frontend code, we need no marking in either the defining or consuming files for a variable exported from these libraries; and frontend code has no need to access variables exported from the core backend, either. While at it, write some actual documentation about the PGDLLIMPORT and PGDLLEXPORT macros. Patch by me, based on a suggestion from Robert Haas. Discussion: https://postgr.es/m/1160385.1638165449@sss.pgh.pa.us
Diffstat (limited to 'src/include/common/pg_prng.h')
-rw-r--r--src/include/common/pg_prng.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/include/common/pg_prng.h b/src/include/common/pg_prng.h
index e4df5165d7e..623c65ae731 100644
--- a/src/include/common/pg_prng.h
+++ b/src/include/common/pg_prng.h
@@ -26,11 +26,7 @@ typedef struct pg_prng_state
* Callers not needing local PRNG series may use this global state vector,
* after initializing it with one of the pg_prng_...seed functions.
*/
-#ifndef FRONTEND
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_fseed(pg_prng_state *state, double fseed);