Add central declarations for dlsym()ed symbols
authorAndres Freund <[email protected]>
Mon, 18 Jul 2022 00:23:42 +0000 (17:23 -0700)
committerAndres Freund <[email protected]>
Mon, 18 Jul 2022 00:23:42 +0000 (17:23 -0700)
commitf2b73c8d75d583adcdd3562adca335d31f430ac5
treef2757634daa0393b131ac631fbdb90e1e4ad1789
parent31e5b502920351ddcf8f5efa7f2dc4a60ecdca3a
Add central declarations for dlsym()ed symbols

This is in preparation for defaulting to -fvisibility=hidden in extensions,
instead of exporting all symbols. For that symbols intended to be exported
need to be tagged with PGDLLEXPORT. Most extensions only need to do so for
_PG_init() and functions defined with PG_FUNCTION_INFO_V1. Adding central
declarations avoids each extension having to add PGDLLEXPORT. Any existing
declarations in extensions will continue to work if fmgr.h is included before
them, otherwise compilation for Windows will fail.

Author: Andres Freund <[email protected]>
Reviewed-By: Tom Lane <[email protected]>
Discussion: https://postgr.es/m/20211101020311[email protected]
src/include/fmgr.h
src/include/jit/jit.h
src/include/postmaster/pgarch.h
src/include/replication/output_plugin.h