Move all extern declarations for GUC variables to header files
authorPeter Eisentraut <peter@eisentraut.org>
Wed, 24 Jul 2024 04:21:39 +0000 (06:21 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Wed, 24 Jul 2024 04:31:07 +0000 (06:31 +0200)
commit774d47b6c01a8b8111ae390b97343f25ebdf9267
treed76544c7d7c068fbe6a10635864424b6261f8c4c
parent991f8cf8abe244547093ddffcc4b9209076f3525
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
12 files changed:
src/backend/commands/variable.c
src/backend/utils/error/elog.c
src/backend/utils/misc/guc.c
src/backend/utils/misc/guc_tables.c
src/include/access/syncscan.h
src/include/access/xlog.h
src/include/access/xlogutils.h
src/include/commands/tablespace.h
src/include/storage/bufpage.h
src/include/tcop/backend_startup.h
src/include/tcop/tcopprot.h
src/include/utils/guc.h