summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorTom Lane2016-11-04 23:04:56 +0000
committerTom Lane2016-11-04 23:04:56 +0000
commitc8ead2a3974d3eada145a0e18940150039493cc9 (patch)
treee3a594209e4ec44d58e4cf33902a0981ccf5bb4d /contrib
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 'contrib')
-rw-r--r--contrib/hstore/hstore.h2
-rw-r--r--contrib/ltree/ltree.h40
2 files changed, 21 insertions, 21 deletions
diff --git a/contrib/hstore/hstore.h b/contrib/hstore/hstore.h
index 6bab08b7de..6303fa4061 100644
--- a/contrib/hstore/hstore.h
+++ b/contrib/hstore/hstore.h
@@ -194,7 +194,7 @@ extern Pairs *hstoreArrayToPairs(ArrayType *a, int *npairs);
#if HSTORE_POLLUTE_NAMESPACE
#define HSTORE_POLLUTE(newname_,oldname_) \
PG_FUNCTION_INFO_V1(oldname_); \
- Datum newname_(PG_FUNCTION_ARGS); \
+ extern PGDLLEXPORT Datum newname_(PG_FUNCTION_ARGS); \
Datum oldname_(PG_FUNCTION_ARGS) { return newname_(fcinfo); } \
extern int no_such_variable
#else
diff --git a/contrib/ltree/ltree.h b/contrib/ltree/ltree.h
index c604357dbf..c7aa7f8818 100644
--- a/contrib/ltree/ltree.h
+++ b/contrib/ltree/ltree.h
@@ -130,30 +130,30 @@ typedef struct
/* use in array iterator */
-Datum ltree_isparent(PG_FUNCTION_ARGS);
-Datum ltree_risparent(PG_FUNCTION_ARGS);
-Datum ltq_regex(PG_FUNCTION_ARGS);
-Datum ltq_rregex(PG_FUNCTION_ARGS);
-Datum lt_q_regex(PG_FUNCTION_ARGS);
-Datum lt_q_rregex(PG_FUNCTION_ARGS);
-Datum ltxtq_exec(PG_FUNCTION_ARGS);
-Datum ltxtq_rexec(PG_FUNCTION_ARGS);
-Datum _ltq_regex(PG_FUNCTION_ARGS);
-Datum _ltq_rregex(PG_FUNCTION_ARGS);
-Datum _lt_q_regex(PG_FUNCTION_ARGS);
-Datum _lt_q_rregex(PG_FUNCTION_ARGS);
-Datum _ltxtq_exec(PG_FUNCTION_ARGS);
-Datum _ltxtq_rexec(PG_FUNCTION_ARGS);
-Datum _ltree_isparent(PG_FUNCTION_ARGS);
-Datum _ltree_risparent(PG_FUNCTION_ARGS);
+extern PGDLLEXPORT Datum ltree_isparent(PG_FUNCTION_ARGS);
+extern PGDLLEXPORT Datum ltree_risparent(PG_FUNCTION_ARGS);
+extern PGDLLEXPORT Datum ltq_regex(PG_FUNCTION_ARGS);
+extern PGDLLEXPORT Datum ltq_rregex(PG_FUNCTION_ARGS);
+extern PGDLLEXPORT Datum lt_q_regex(PG_FUNCTION_ARGS);
+extern PGDLLEXPORT Datum lt_q_rregex(PG_FUNCTION_ARGS);
+extern PGDLLEXPORT Datum ltxtq_exec(PG_FUNCTION_ARGS);
+extern PGDLLEXPORT Datum ltxtq_rexec(PG_FUNCTION_ARGS);
+extern PGDLLEXPORT Datum _ltq_regex(PG_FUNCTION_ARGS);
+extern PGDLLEXPORT Datum _ltq_rregex(PG_FUNCTION_ARGS);
+extern PGDLLEXPORT Datum _lt_q_regex(PG_FUNCTION_ARGS);
+extern PGDLLEXPORT Datum _lt_q_rregex(PG_FUNCTION_ARGS);
+extern PGDLLEXPORT Datum _ltxtq_exec(PG_FUNCTION_ARGS);
+extern PGDLLEXPORT Datum _ltxtq_rexec(PG_FUNCTION_ARGS);
+extern PGDLLEXPORT Datum _ltree_isparent(PG_FUNCTION_ARGS);
+extern PGDLLEXPORT Datum _ltree_risparent(PG_FUNCTION_ARGS);
/* Concatenation functions */
-Datum ltree_addltree(PG_FUNCTION_ARGS);
-Datum ltree_addtext(PG_FUNCTION_ARGS);
-Datum ltree_textadd(PG_FUNCTION_ARGS);
+extern PGDLLEXPORT Datum ltree_addltree(PG_FUNCTION_ARGS);
+extern PGDLLEXPORT Datum ltree_addtext(PG_FUNCTION_ARGS);
+extern PGDLLEXPORT Datum ltree_textadd(PG_FUNCTION_ARGS);
/* Util function */
-Datum ltree_in(PG_FUNCTION_ARGS);
+extern PGDLLEXPORT Datum ltree_in(PG_FUNCTION_ARGS);
bool ltree_execute(ITEM *curitem, void *checkval,
bool calcnot, bool (*chkcond) (void *checkval, ITEM *val));