From 774d47b6c01a8b8111ae390b97343f25ebdf9267 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 24 Jul 2024 06:21:39 +0200 Subject: 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 Discussion: https://www.postgresql.org/message-id/flat/e0a62134-83da-4ba4-8cdb-ceb0111c95ce@eisentraut.org --- src/backend/utils/misc/guc_tables.c | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) (limited to 'src/backend/utils/misc/guc_tables.c') diff --git a/src/backend/utils/misc/guc_tables.c b/src/backend/utils/misc/guc_tables.c index 630ed0f1629..f6fcdebb031 100644 --- a/src/backend/utils/misc/guc_tables.c +++ b/src/backend/utils/misc/guc_tables.c @@ -34,6 +34,7 @@ #include "access/xlog_internal.h" #include "access/xlogprefetcher.h" #include "access/xlogrecovery.h" +#include "access/xlogutils.h" #include "archive/archive_module.h" #include "catalog/namespace.h" #include "catalog/storage.h" @@ -71,10 +72,12 @@ #include "replication/slotsync.h" #include "replication/syncrep.h" #include "storage/bufmgr.h" +#include "storage/bufpage.h" #include "storage/large_object.h" #include "storage/pg_shmem.h" #include "storage/predicate.h" #include "storage/standby.h" +#include "tcop/backend_startup.h" #include "tcop/tcopprot.h" #include "tsearch/ts_cache.h" #include "utils/builtins.h" @@ -90,28 +93,15 @@ #include "utils/rls.h" #include "utils/xml.h" +#ifdef TRACE_SYNCSCAN +#include "access/syncscan.h" +#endif + /* This value is normally passed in from the Makefile */ #ifndef PG_KRB_SRVTAB #define PG_KRB_SRVTAB "" #endif -/* XXX these should appear in other modules' header files */ -extern bool Log_disconnections; -extern bool Trace_connection_negotiation; -extern int CommitDelay; -extern int CommitSiblings; -extern char *default_tablespace; -extern char *temp_tablespaces; -extern bool ignore_checksum_failure; -extern bool ignore_invalid_pages; - -#ifdef TRACE_SYNCSCAN -extern bool trace_syncscan; -#endif -#ifdef DEBUG_BOUNDED_SORT -extern bool optimize_bounded_sort; -#endif - /* * Options for enum values defined in this module. * -- cgit v1.2.3