summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane2016-11-04 23:04:56 +0000
committerTom Lane2016-11-04 23:04:56 +0000
commitc8ead2a3974d3eada145a0e18940150039493cc9 (patch)
treee3a594209e4ec44d58e4cf33902a0981ccf5bb4d /src
parent20540710e83f2873707c284a0c0693f0b57156c4 (diff)
Provide DLLEXPORT markers for C functions via PG_FUNCTION_INFO_V1 macro.
Second try at the change originally made in commit 8518583cd; this time with contrib updates so that manual extern declarations are also marked with PGDLLEXPORT. The release notes should point this out as a significant source-code change for extension authors, since they'll have to make similar additions to avoid trouble on Windows. Laurenz Albe, doc change by me Patch: <A737B7A37273E048B164557ADEF4A58B53962ED8@ntex2010a.host.magwien.gv.at>
Diffstat (limited to 'src')
-rw-r--r--src/include/fmgr.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/include/fmgr.h b/src/include/fmgr.h
index 0878418516e..3668ac3f6e9 100644
--- a/src/include/fmgr.h
+++ b/src/include/fmgr.h
@@ -350,12 +350,11 @@ typedef const Pg_finfo_record *(*PGFInfoFunction) (void);
*
* On Windows, the function and info function must be exported. Our normal
* build processes take care of that via .DEF files or --export-all-symbols.
- * Module authors using a different build process might need to manually
- * declare the function PGDLLEXPORT. We do that automatically here for the
- * info function, since authors shouldn't need to be explicitly aware of it.
+ * Module authors using a different build process might do it differently,
+ * so we declare these functions PGDLLEXPORT for their convenience.
*/
#define PG_FUNCTION_INFO_V1(funcname) \
-extern Datum funcname(PG_FUNCTION_ARGS); \
+extern PGDLLEXPORT Datum funcname(PG_FUNCTION_ARGS); \
extern PGDLLEXPORT const Pg_finfo_record * CppConcat(pg_finfo_,funcname)(void); \
const Pg_finfo_record * \
CppConcat(pg_finfo_,funcname) (void) \