pgsql: Simplify declaring variables exported from libpgcommon and libpg

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Simplify declaring variables exported from libpgcommon and libpg
Date: 2021-11-29 16:00:06
Message-ID: E1mrj4Y-0006lT-GJ@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e04a8059a74c125a8af94acdcb7b15b92188470a

Modified Files
--------------
src/include/c.h | 14 +++++++++++++-
src/include/common/keywords.h | 6 ------
src/include/common/pg_prng.h | 4 ----
src/include/port/cygwin.h | 10 ++++++++--
src/include/port/pg_bitutils.h | 6 ------
src/include/port/win32.h | 14 ++++++++++++--
6 files changed, 33 insertions(+), 21 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Geoghegan 2021-11-29 16:40:31 Re: pgsql: Update high level vacuumlazy.c comments.
Previous Message Robert Haas 2021-11-29 14:58:12 Re: pgsql: Update high level vacuumlazy.c comments.