diff options
| author | Tom Lane | 2021-11-29 16:00:00 +0000 |
|---|---|---|
| committer | Tom Lane | 2021-11-29 16:00:00 +0000 |
| commit | e04a8059a74c125a8af94acdcb7b15b92188470a (patch) | |
| tree | 0be52ca72de433f2ff8f3eb5e43a517055cc209f /src/include/common | |
| parent | 11b500072e42c214462b973b0b05f1c68992226b (diff) | |
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')
| -rw-r--r-- | src/include/common/keywords.h | 6 | ||||
| -rw-r--r-- | src/include/common/pg_prng.h | 4 |
2 files changed, 0 insertions, 10 deletions
diff --git a/src/include/common/keywords.h b/src/include/common/keywords.h index 19e4eda8f9e..d2e94e13d29 100644 --- a/src/include/common/keywords.h +++ b/src/include/common/keywords.h @@ -22,14 +22,8 @@ #define TYPE_FUNC_NAME_KEYWORD 2 #define RESERVED_KEYWORD 3 -#ifndef FRONTEND extern PGDLLIMPORT const ScanKeywordList ScanKeywords; extern PGDLLIMPORT const uint8 ScanKeywordCategories[]; extern PGDLLIMPORT const bool ScanKeywordBareLabel[]; -#else -extern const ScanKeywordList ScanKeywords; -extern const uint8 ScanKeywordCategories[]; -extern const bool ScanKeywordBareLabel[]; -#endif #endif /* KEYWORDS_H */ 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); |
