Remove now superfluous declarations of dlsym()ed symbols.
authorAndres Freund <[email protected]>
Mon, 18 Jul 2022 00:29:32 +0000 (17:29 -0700)
committerAndres Freund <[email protected]>
Mon, 18 Jul 2022 00:29:32 +0000 (17:29 -0700)
The prior commit declared them centrally.

Author: Andres Freund <[email protected]>
Reviewed-By: Tom Lane <[email protected]>
Discussion: https://postgr.es/m/20211101020311[email protected]

31 files changed:
contrib/auth_delay/auth_delay.c
contrib/auto_explain/auto_explain.c
contrib/basebackup_to_shell/basebackup_to_shell.c
contrib/basic_archive/basic_archive.c
contrib/bloom/bloom.h
contrib/hstore_plperl/hstore_plperl.c
contrib/hstore_plpython/hstore_plpython.c
contrib/isn/isn.c
contrib/jsonb_plpython/jsonb_plpython.c
contrib/ltree_plpython/ltree_plpython.c
contrib/passwordcheck/passwordcheck.c
contrib/pg_prewarm/autoprewarm.c
contrib/pg_stat_statements/pg_stat_statements.c
contrib/pg_trgm/trgm_op.c
contrib/postgres_fdw/option.c
contrib/sepgsql/hooks.c
contrib/test_decoding/test_decoding.c
src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
src/backend/replication/pgoutput/pgoutput.c
src/pl/plperl/plperl.c
src/pl/plpgsql/src/plpgsql.h
src/pl/plpython/plpy_main.c
src/pl/tcl/pltcl.c
src/test/modules/delay_execution/delay_execution.c
src/test/modules/dummy_index_am/dummy_index_am.c
src/test/modules/dummy_seclabel/dummy_seclabel.c
src/test/modules/ssl_passphrase_callback/ssl_passphrase_func.c
src/test/modules/test_oat_hooks/test_oat_hooks.c
src/test/modules/test_rls_hooks/test_rls_hooks.c
src/test/modules/test_shm_mq/test.c
src/test/modules/worker_spi/worker_spi.c

index 6b94d653ea4f86e6685563c7039b9ed841b437d5..c3d78e5020f2e53b30ab230edbe3484024be6764 100644 (file)
@@ -20,8 +20,6 @@
 
 PG_MODULE_MAGIC;
 
-void       _PG_init(void);
-
 /* GUC Variables */
 static int auth_delay_milliseconds;
 
index 1ba7536879d2da54c20acebcce28cd22d8c6919a..269a0fa86c5a6332ffdca65fb0af3856a99f99db 100644 (file)
@@ -78,8 +78,6 @@ static ExecutorRun_hook_type prev_ExecutorRun = NULL;
 static ExecutorFinish_hook_type prev_ExecutorFinish = NULL;
 static ExecutorEnd_hook_type prev_ExecutorEnd = NULL;
 
-void       _PG_init(void);
-
 static void explain_ExecutorStart(QueryDesc *queryDesc, int eflags);
 static void explain_ExecutorRun(QueryDesc *queryDesc,
                                ScanDirection direction,
index bc754b177afbb79c7f3dc8a1a85057ed6a72030b..34188f2d9d3cbbfb1f278f074bcdb0675eeb93b7 100644 (file)
@@ -37,8 +37,6 @@ typedef struct bbsink_shell
    FILE       *pipe;
 } bbsink_shell;
 
-void       _PG_init(void);
-
 static void *shell_check_detail(char *target, char *target_detail);
 static bbsink *shell_get_sink(bbsink *next_sink, void *detail_arg);
 
index 6b550fc55f79e1de4f04e815df10a8f33b831e96..bba767c8f36dc595c21075f1211ab009efa2d892 100644 (file)
@@ -40,9 +40,6 @@
 
 PG_MODULE_MAGIC;
 
-void       _PG_init(void);
-void       _PG_archive_module_init(ArchiveModuleCallbacks *cb);
-
 static char *archive_directory = NULL;
 static MemoryContext basic_archive_context;
 
index 9966f3f46e168a90f3981d7800d1eab747cdd60d..6d58e22813dacdbebff2d27f1bd9115771419753 100644 (file)
@@ -175,7 +175,6 @@ typedef struct BloomScanOpaqueData
 typedef BloomScanOpaqueData *BloomScanOpaque;
 
 /* blutils.c */
-extern void _PG_init(void);
 extern void initBloomState(BloomState *state, Relation index);
 extern void BloomFillMetapage(Relation index, Page metaPage);
 extern void BloomInitMetapage(Relation index);
index 417b721cff9ae63545b43595d7966e835d96ca0e..c72785d99eca11b453f5195471527ecc383d823e 100644 (file)
@@ -7,8 +7,6 @@
 
 PG_MODULE_MAGIC;
 
-extern void _PG_init(void);
-
 /* Linkage to functions in hstore module */
 typedef HStore *(*hstoreUpgrade_t) (Datum orig);
 static hstoreUpgrade_t hstoreUpgrade_p;
index 0be65075916db8044e158d524cff4f25affbeb85..961579a5ea0f0d341c563b49055988f12ba5c284 100644 (file)
@@ -7,8 +7,6 @@
 
 PG_MODULE_MAGIC;
 
-extern void _PG_init(void);
-
 /* Linkage to functions in plpython module */
 typedef char *(*PLyObject_AsString_t) (PyObject *plrv);
 static PLyObject_AsString_t PLyObject_AsString_p;
index 7493a2c60fa19a6cfc6275c5e4b77f8af3caa0de..a53d99722ad4220c29287055d489e6e8e4585eb9 100644 (file)
@@ -924,8 +924,6 @@ eantoobig:
  * Exported routines.
  *---------------------------------------------------------*/
 
-void       _PG_init(void);
-
 void
 _PG_init(void)
 {
index 03bbfa87d9a59b297632bdf5d8b8293ef06b82fe..a625727c5e8ca1d857c09e394505f5070987279c 100644 (file)
@@ -9,8 +9,6 @@
 
 PG_MODULE_MAGIC;
 
-void       _PG_init(void);
-
 /* for PLyObject_AsString in plpy_typeio.c */
 typedef char *(*PLyObject_AsString_t) (PyObject *plrv);
 static PLyObject_AsString_t PLyObject_AsString_p;
index 7431a1150a90aba96309bc6f11adc69896eeda9a..ac159ea31415c772f9d750fcbe08005eacce71a1 100644 (file)
@@ -6,8 +6,6 @@
 
 PG_MODULE_MAGIC;
 
-extern void _PG_init(void);
-
 /* Linkage to functions in plpython module */
 typedef PyObject *(*PLyUnicode_FromStringAndSize_t) (const char *s, Py_ssize_t size);
 static PLyUnicode_FromStringAndSize_t PLyUnicode_FromStringAndSize_p;
index 9d8c58ded0922fc08f5c23f52e930a566d1987b1..c24b1cbe43e05f97eec50c88c584863aef2ff313 100644 (file)
@@ -32,8 +32,6 @@ static check_password_hook_type prev_check_password_hook = NULL;
 /* passwords shorter than this will be rejected */
 #define MIN_PWD_LENGTH 8
 
-extern void _PG_init(void);
-
 /*
  * check_password
  *
index 13eee4a137942e0f3a6172c8006732dc8b391bf1..b2d602609343ae60d09ffd6ed03f0cc1be4f701e 100644 (file)
@@ -82,7 +82,6 @@ typedef struct AutoPrewarmSharedState
    int         prewarmed_blocks;
 } AutoPrewarmSharedState;
 
-void       _PG_init(void);
 void       autoprewarm_main(Datum main_arg);
 void       autoprewarm_database_main(Datum main_arg);
 
index b4d4231dc617325e4584de0f81817f159c126d84..049da9fe6df9dd72448bebf0318dac8e7955cc18 100644 (file)
@@ -305,8 +305,6 @@ static bool pgss_save;          /* whether to save stats across shutdown */
 
 /*---- Function declarations ----*/
 
-void       _PG_init(void);
-
 PG_FUNCTION_INFO_V1(pg_stat_statements_reset);
 PG_FUNCTION_INFO_V1(pg_stat_statements_reset_1_7);
 PG_FUNCTION_INFO_V1(pg_stat_statements_1_2);
index cbcc481a1722292818026d5158ae30f99d6181f5..49b3609de93b4fbb88557891ad49e2b58a8ed334 100644 (file)
@@ -20,8 +20,6 @@ double        similarity_threshold = 0.3f;
 double     word_similarity_threshold = 0.6f;
 double     strict_word_similarity_threshold = 0.5f;
 
-void       _PG_init(void);
-
 PG_FUNCTION_INFO_V1(set_limit);
 PG_FUNCTION_INFO_V1(show_limit);
 PG_FUNCTION_INFO_V1(show_trgm);
index 572591a558d1193d86e368c72cbddc53369c4a99..cd2ef234d66a56d74350891a0617e985f0df291e 100644 (file)
@@ -51,8 +51,6 @@ static PQconninfoOption *libpq_options;
  */
 char      *pgfdw_application_name = NULL;
 
-void       _PG_init(void);
-
 /*
  * Helper functions
  */
index 97e61b8043fe7ad93384bf5ab0763423422955f1..87fdd972c2788b9847b58bb6e2c41660e14c1c7f 100644 (file)
@@ -30,7 +30,6 @@ PG_MODULE_MAGIC;
 /*
  * Declarations
  */
-void       _PG_init(void);
 
 /*
  * Saved hook entries (if stacked)
index 3736da6784b1053c195ad16a711499d5637c22d8..3f90ffa32de56ef3f72a9ce4d603ddaef115300c 100644 (file)
 
 PG_MODULE_MAGIC;
 
-/* These must be available to dlsym() */
-extern void _PG_init(void);
-extern void _PG_output_plugin_init(OutputPluginCallbacks *cb);
-
 typedef struct
 {
    MemoryContext context;
index 0d89db4e6a6802fd668a3e239c71157eb30eebb8..0b775b1e9853e8cb5c6d567ac2c4f8f9007dbd78 100644 (file)
@@ -36,8 +36,6 @@
 
 PG_MODULE_MAGIC;
 
-void       _PG_init(void);
-
 struct WalReceiverConn
 {
    /* Current connection to the primary, if any */
index 2cbca4a08708cd82b255f731cd296e086ffaae6e..ba8a24d0999fa598351b4321e037d528203c862e 100644 (file)
@@ -35,8 +35,6 @@
 
 PG_MODULE_MAGIC;
 
-extern void _PG_output_plugin_init(OutputPluginCallbacks *cb);
-
 static void pgoutput_startup(LogicalDecodingContext *ctx,
                             OutputPluginOptions *opt, bool is_init);
 static void pgoutput_shutdown(LogicalDecodingContext *ctx);
index edb93ec1c4cf40302aab970235d14b566516ecaf..af354a68ccda35c48290e07391ce9092e25460fb 100644 (file)
@@ -245,7 +245,6 @@ static plperl_call_data *current_call_data = NULL;
 /**********************************************************************
  * Forward declarations
  **********************************************************************/
-void       _PG_init(void);
 
 static PerlInterpreter *plperl_init_interp(void);
 static void plperl_destroy_interp(PerlInterpreter **);
index 4e6ee1c6198c0fea28cad0b8bcd904c1ceac1870..191416027292791439a147937ffd07850050f500 100644 (file)
@@ -1264,11 +1264,6 @@ extern void plpgsql_adddatum(PLpgSQL_datum *newdatum);
 extern int plpgsql_add_initdatums(int **varnos);
 extern void plpgsql_HashTableInit(void);
 
-/*
- * Functions in pl_handler.c
- */
-extern void _PG_init(void);
-
 /*
  * Functions in pl_exec.c
  */
index 0bce10649518afffa97bae692a0afe09bd393f91..a4d66f3057fcd5ded7254ea36c9d2899150baa62 100644 (file)
@@ -28,8 +28,6 @@
  * exported functions
  */
 
-extern void _PG_init(void);
-
 PG_MODULE_MAGIC;
 
 PG_FUNCTION_INFO_V1(plpython3_validator);
index 0dd6d8ab2c241cfd0e51610642c091f5a4fca431..eaa98d42c2e6d28599fdcd1d58746fc50c4c6bb2 100644 (file)
@@ -261,7 +261,6 @@ static const TclExceptionNameMap exception_name_map[] = {
 /**********************************************************************
  * Forward declarations
  **********************************************************************/
-void       _PG_init(void);
 
 static void pltcl_init_interp(pltcl_interp_desc *interp_desc,
                              Oid prolang, bool pltrusted);
index 407ebc0edaff70446fba2aa59eed5c86180a2ad6..756c161872c6b9b80bdb260284cc09047cc323d0 100644 (file)
@@ -36,9 +36,6 @@ static int    post_planning_lock_id = 0;
 /* Save previous planner hook user to be a good citizen */
 static planner_hook_type prev_planner_hook = NULL;
 
-/* Module load function */
-void       _PG_init(void);
-
 
 /* planner_hook function to provide the desired delay */
 static PlannedStmt *
index a0894ff9860b650526e17b28aa0b45bfc6c258d4..67c30394c8003d4799ad712b7b873db2fc10c0bf 100644 (file)
@@ -23,8 +23,6 @@
 
 PG_MODULE_MAGIC;
 
-void       _PG_init(void);
-
 /* parse table for fillRelOptions */
 relopt_parse_elt di_relopt_tab[6];
 
index 67658c1e1220089b21b69d5f7c2d90b9bec2663e..8b03dcd7545ace4f2aaaaca19e5bafb891600ba7 100644 (file)
@@ -19,9 +19,6 @@
 
 PG_MODULE_MAGIC;
 
-/* Entrypoint of the module */
-void       _PG_init(void);
-
 PG_FUNCTION_INFO_V1(dummy_seclabel_dummy);
 
 static void
index e9f2329a5aa33e773dca55c63fdd91eeb48d1f45..948706af85221311b4f76ebb3b32a663dac3261c 100644 (file)
@@ -20,8 +20,6 @@
 
 PG_MODULE_MAGIC;
 
-void       _PG_init(void);
-
 static char *ssl_passphrase = NULL;
 
 /* callback function */
index 900d597f5ddca896ee512a481bbd38be62c5a794..8aa59bf18ade28b48cdeff5ecdc60d10d001b0ee 100644 (file)
@@ -69,8 +69,6 @@ static char *accesstype_to_string(ObjectAccessType access, int subId);
 static char *accesstype_arg_to_string(ObjectAccessType access, void *arg);
 
 
-void       _PG_init(void);
-
 /*
  * Module load callback
  */
index fd2864130eb501c75a61199f5377b5aa68c8407c..496846d9f499dc10cca2173487e036f75fb79200 100644 (file)
@@ -29,8 +29,6 @@
 
 PG_MODULE_MAGIC;
 
-void       _PG_init(void);
-
 /* Install hooks */
 void
 _PG_init(void)
index 5a788692d954604e81e2cbc1dec3ed603b2a68e6..1d1c184d8cea35787a51c6a6dac58c0fb9bc83e7 100644 (file)
@@ -24,8 +24,6 @@ PG_MODULE_MAGIC;
 PG_FUNCTION_INFO_V1(test_shm_mq);
 PG_FUNCTION_INFO_V1(test_shm_mq_pipelined);
 
-void       _PG_init(void);
-
 static void verify_message(Size origlen, char *origdata, Size newlen,
                           char *newdata);
 
index 5b541ec47f15a310a45ee509426605004ae570f2..b37ef8beb60c4e84fde29d75e163b22379703d58 100644 (file)
@@ -46,7 +46,6 @@ PG_MODULE_MAGIC;
 
 PG_FUNCTION_INFO_V1(worker_spi_launch);
 
-void       _PG_init(void);
 void       worker_spi_main(Datum) pg_attribute_noreturn();
 
 /* GUC variables */