From 2f1c496f88a3487a41ffd1922f35966601e8d57e Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 30 Aug 2016 12:00:00 -0400 Subject: [PATCH v2 14/23] Add more extern key words C++ needs those to make the definitions visible externally. This is not compatible with C. --- src/backend/access/rmgrdesc/xlogdesc.c | 2 +- src/backend/access/transam/xlog.c | 4 ++-- src/backend/storage/ipc/dsm_impl.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/backend/access/rmgrdesc/xlogdesc.c b/src/backend/access/rmgrdesc/xlogdesc.c index 5f07eb1499..9a968746c0 100644 --- a/src/backend/access/rmgrdesc/xlogdesc.c +++ b/src/backend/access/rmgrdesc/xlogdesc.c @@ -23,7 +23,7 @@ /* * GUC support */ -const struct config_enum_entry wal_level_options[] = { +extern const struct config_enum_entry wal_level_options[] = { {"minimal", WAL_LEVEL_MINIMAL, false}, {"replica", WAL_LEVEL_REPLICA, false}, {"archive", WAL_LEVEL_REPLICA, true}, /* deprecated */ diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 038b8472ae..20ea393103 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -129,7 +129,7 @@ static double PrevCheckPointDistance = 0; /* * GUC support */ -const struct config_enum_entry sync_method_options[] = { +extern const struct config_enum_entry sync_method_options[] = { {"fsync", SYNC_METHOD_FSYNC, false}, #ifdef HAVE_FSYNC_WRITETHROUGH {"fsync_writethrough", SYNC_METHOD_FSYNC_WRITETHROUGH, false}, @@ -151,7 +151,7 @@ const struct config_enum_entry sync_method_options[] = { * Although only "on", "off", and "always" are documented, * we accept all the likely variants of "on" and "off". */ -const struct config_enum_entry archive_mode_options[] = { +extern const struct config_enum_entry archive_mode_options[] = { {"always", ARCHIVE_MODE_ALWAYS, false}, {"on", ARCHIVE_MODE_ON, false}, {"off", ARCHIVE_MODE_OFF, false}, diff --git a/src/backend/storage/ipc/dsm_impl.c b/src/backend/storage/ipc/dsm_impl.c index b2c9cdc6ed..0d3f595d04 100644 --- a/src/backend/storage/ipc/dsm_impl.c +++ b/src/backend/storage/ipc/dsm_impl.c @@ -90,7 +90,7 @@ static bool dsm_impl_mmap(dsm_op op, dsm_handle handle, Size request_size, #endif static int errcode_for_dynamic_shared_memory(void); -const struct config_enum_entry dynamic_shared_memory_options[] = { +extern const struct config_enum_entry dynamic_shared_memory_options[] = { #ifdef USE_DSM_POSIX {"posix", DSM_IMPL_POSIX, false}, #endif -- 2.12.0