Обсуждение: pgsql: Move all extern declarations for GUC variables to header files

Поиск
Список
Период
Сортировка

pgsql: Move all extern declarations for GUC variables to header files

От
Peter Eisentraut
Дата:
Move all extern declarations for GUC variables to header files

Add extern declarations in appropriate header files for global
variables related to GUC.  In many cases, this was handled quite
inconsistently before, with some GUC variables declared in a header
file and some only pulled in via ad-hoc extern declarations in various
.c files.

Also add PGDLLIMPORT qualifications to those variables.  These were
previously missing because src/tools/mark_pgdllimport.pl has only been
used with header files.

This also fixes -Wmissing-variable-declarations warnings for GUC
variables (not yet part of the standard warning options).

Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://www.postgresql.org/message-id/flat/e0a62134-83da-4ba4-8cdb-ceb0111c95ce@eisentraut.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/774d47b6c01a8b8111ae390b97343f25ebdf9267

Modified Files
--------------
src/backend/commands/variable.c     |  1 -
src/backend/utils/error/elog.c      |  2 --
src/backend/utils/misc/guc.c        |  3 ---
src/backend/utils/misc/guc_tables.c | 24 +++++++-----------------
src/include/access/syncscan.h       |  5 +++++
src/include/access/xlog.h           |  2 ++
src/include/access/xlogutils.h      |  3 +++
src/include/commands/tablespace.h   |  2 ++
src/include/storage/bufpage.h       |  3 +++
src/include/tcop/backend_startup.h  |  3 +++
src/include/tcop/tcopprot.h         |  1 +
src/include/utils/guc.h             | 25 +++++++++++++++++++++++++
12 files changed, 51 insertions(+), 23 deletions(-)