From: Steve Singer Date: Sun, 24 May 2020 00:35:03 +0000 (-0400) Subject: move variable declarations to the .c file X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=d31094f0ab5df9504847c7c0f4085f86b417321c;p=slony1-engine.git move variable declarations to the .c file headers should only include extern declarations. Add -fno-common to the default compiler options. This is now standard with GCC 10+ compilers with -fno-common will error out on the duplicate definitions. --- diff --git a/Makefile.global.in b/Makefile.global.in index 71d13180..bd220247 100644 --- a/Makefile.global.in +++ b/Makefile.global.in @@ -92,7 +92,7 @@ subdir=$(slony_subdir) LDFLAGS += -lpq @NLSLIB@ ifeq ($(GCC), yes) - CFLAGS += -Wall -Wmissing-prototypes -Wmissing-declarations + CFLAGS += -Wall -Wmissing-prototypes -Wmissing-declarations -fno-common endif # Installation. diff --git a/src/slon/confoptions.c b/src/slon/confoptions.c index 4eb6b855..bf3ccc87 100644 --- a/src/slon/confoptions.c +++ b/src/slon/confoptions.c @@ -24,7 +24,17 @@ static double real_placeholder; void dump_configuration(void); void build_conf_variables(void); - +char *Syslog_ident; +char *Syslog_facility; +int Use_syslog; + +bool logpid; +bool logtimestamp; +bool drop_indices; +char *log_timestamp_format; +char *sql_on_connection; +char *lag_interval; +char *command_on_logarchive; static struct config_int ConfigureNamesInt[] = { diff --git a/src/slon/confoptions.h b/src/slon/confoptions.h index 63c5c8f4..e20d0600 100644 --- a/src/slon/confoptions.h +++ b/src/slon/confoptions.h @@ -43,18 +43,8 @@ extern int apply_cache_size; extern int vac_frequency; extern char *cleanup_interval; -char *Syslog_ident; -char *Syslog_facility; -int Use_syslog; - -bool logpid; -bool logtimestamp; -bool drop_indices; -char *log_timestamp_format; -char *sql_on_connection; -char *lag_interval; -char *command_on_logarchive; +extern char *command_on_logarchive; enum config_type { SLON_C_BOOL,