Hi hackers, I noticed that in commit d3cc5ffe81f6 some GUC variables were moved to header files. According to the commit message in 8ec569479, all variables in header files must be marked with PGDLLIMPORT, am I right?
I've made a patch that adds missing PGDLLIMPORTs, please, take a look. -- Best regards, Sofia Kopikova Postgres Professional: http://www.postgrespro.com
From 603b0433b9538423a324ae980e0a19d7caaf222e Mon Sep 17 00:00:00 2001 From: Sofia Kopikova <s.kopik...@postgrespro.ru> Date: Tue, 13 Aug 2024 16:05:13 +0300 Subject: [PATCH] Apply PGDLLIMPORT markings to some GUC variables According to the commit message in 8ec569479, we must have all variables in header files marked with PGDLLIMPORT. In commit d3cc5ffe81f6 some variables were moved from launch_backend.c file to several header files. This adds PGDLLIMPORT to moved variables. --- src/include/postmaster/syslogger.h | 2 +- src/include/storage/pmsignal.h | 2 +- src/include/storage/proc.h | 4 ++-- src/include/storage/procsignal.h | 2 +- src/include/utils/guc.h | 10 +++++----- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/include/postmaster/syslogger.h b/src/include/postmaster/syslogger.h index b5fc239ba9c..94ea263f2bf 100644 --- a/src/include/postmaster/syslogger.h +++ b/src/include/postmaster/syslogger.h @@ -76,7 +76,7 @@ extern PGDLLIMPORT bool Log_truncate_on_rotation; extern PGDLLIMPORT int Log_file_mode; #ifdef EXEC_BACKEND -extern pg_time_t first_syslogger_file_time; +extern PGDLLIMPORT pg_time_t first_syslogger_file_time; #endif #ifndef WIN32 diff --git a/src/include/storage/pmsignal.h b/src/include/storage/pmsignal.h index 0c9a7e32a8a..87ac91848bc 100644 --- a/src/include/storage/pmsignal.h +++ b/src/include/storage/pmsignal.h @@ -58,7 +58,7 @@ typedef enum typedef struct PMSignalData PMSignalData; #ifdef EXEC_BACKEND -extern volatile PMSignalData *PMSignalState; +extern PGDLLIMPORT volatile PMSignalData *PMSignalState; #endif /* diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h index bbd893a544e..deeb06c9e01 100644 --- a/src/include/storage/proc.h +++ b/src/include/storage/proc.h @@ -454,8 +454,8 @@ extern PGDLLIMPORT int IdleSessionTimeout; extern PGDLLIMPORT bool log_lock_waits; #ifdef EXEC_BACKEND -extern slock_t *ProcStructLock; -extern PGPROC *AuxiliaryProcs; +extern PGDLLIMPORT slock_t *ProcStructLock; +extern PGDLLIMPORT PGPROC *AuxiliaryProcs; #endif diff --git a/src/include/storage/procsignal.h b/src/include/storage/procsignal.h index 2516869465d..f94c11a9a84 100644 --- a/src/include/storage/procsignal.h +++ b/src/include/storage/procsignal.h @@ -77,7 +77,7 @@ extern void procsignal_sigusr1_handler(SIGNAL_ARGS); typedef struct ProcSignalHeader ProcSignalHeader; #ifdef EXEC_BACKEND -extern ProcSignalHeader *ProcSignal; +extern PGDLLIMPORT ProcSignalHeader *ProcSignal; #endif #endif /* PROCSIGNAL_H */ diff --git a/src/include/utils/guc.h b/src/include/utils/guc.h index ba6883ae8fc..0f59de542f3 100644 --- a/src/include/utils/guc.h +++ b/src/include/utils/guc.h @@ -315,11 +315,11 @@ extern PGDLLIMPORT bool optimize_bounded_sort; * that would then require including the definition of struct * config_enum_entry into those header files.) */ -extern const struct config_enum_entry archive_mode_options[]; -extern const struct config_enum_entry dynamic_shared_memory_options[]; -extern const struct config_enum_entry recovery_target_action_options[]; -extern const struct config_enum_entry wal_level_options[]; -extern const struct config_enum_entry wal_sync_method_options[]; +extern PGDLLIMPORT const struct config_enum_entry archive_mode_options[]; +extern PGDLLIMPORT const struct config_enum_entry dynamic_shared_memory_options[]; +extern PGDLLIMPORT const struct config_enum_entry recovery_target_action_options[]; +extern PGDLLIMPORT const struct config_enum_entry wal_level_options[]; +extern PGDLLIMPORT const struct config_enum_entry wal_sync_method_options[]; /* * Functions exported by guc.c -- 2.39.2