mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-01 23:11:29 +02:00
Revert "Provide DLLEXPORT markers for C functions via PG_FUNCTION_INFO_V1 macro."
This reverts commit c8ead2a397
.
Seems there is no way to do this that doesn't cause MSVC to give
warnings, so let's just go back to the way we've been doing it.
Discussion: <11843.1478358206@sss.pgh.pa.us>
This commit is contained in:
parent
77517ba59f
commit
33cb96ba1a
@ -194,7 +194,7 @@ extern Pairs *hstoreArrayToPairs(ArrayType *a, int *npairs);
|
|||||||
#if HSTORE_POLLUTE_NAMESPACE
|
#if HSTORE_POLLUTE_NAMESPACE
|
||||||
#define HSTORE_POLLUTE(newname_,oldname_) \
|
#define HSTORE_POLLUTE(newname_,oldname_) \
|
||||||
PG_FUNCTION_INFO_V1(oldname_); \
|
PG_FUNCTION_INFO_V1(oldname_); \
|
||||||
extern PGDLLEXPORT Datum newname_(PG_FUNCTION_ARGS); \
|
Datum newname_(PG_FUNCTION_ARGS); \
|
||||||
Datum oldname_(PG_FUNCTION_ARGS) { return newname_(fcinfo); } \
|
Datum oldname_(PG_FUNCTION_ARGS) { return newname_(fcinfo); } \
|
||||||
extern int no_such_variable
|
extern int no_such_variable
|
||||||
#else
|
#else
|
||||||
|
@ -130,30 +130,30 @@ typedef struct
|
|||||||
|
|
||||||
|
|
||||||
/* use in array iterator */
|
/* use in array iterator */
|
||||||
extern PGDLLEXPORT Datum ltree_isparent(PG_FUNCTION_ARGS);
|
Datum ltree_isparent(PG_FUNCTION_ARGS);
|
||||||
extern PGDLLEXPORT Datum ltree_risparent(PG_FUNCTION_ARGS);
|
Datum ltree_risparent(PG_FUNCTION_ARGS);
|
||||||
extern PGDLLEXPORT Datum ltq_regex(PG_FUNCTION_ARGS);
|
Datum ltq_regex(PG_FUNCTION_ARGS);
|
||||||
extern PGDLLEXPORT Datum ltq_rregex(PG_FUNCTION_ARGS);
|
Datum ltq_rregex(PG_FUNCTION_ARGS);
|
||||||
extern PGDLLEXPORT Datum lt_q_regex(PG_FUNCTION_ARGS);
|
Datum lt_q_regex(PG_FUNCTION_ARGS);
|
||||||
extern PGDLLEXPORT Datum lt_q_rregex(PG_FUNCTION_ARGS);
|
Datum lt_q_rregex(PG_FUNCTION_ARGS);
|
||||||
extern PGDLLEXPORT Datum ltxtq_exec(PG_FUNCTION_ARGS);
|
Datum ltxtq_exec(PG_FUNCTION_ARGS);
|
||||||
extern PGDLLEXPORT Datum ltxtq_rexec(PG_FUNCTION_ARGS);
|
Datum ltxtq_rexec(PG_FUNCTION_ARGS);
|
||||||
extern PGDLLEXPORT Datum _ltq_regex(PG_FUNCTION_ARGS);
|
Datum _ltq_regex(PG_FUNCTION_ARGS);
|
||||||
extern PGDLLEXPORT Datum _ltq_rregex(PG_FUNCTION_ARGS);
|
Datum _ltq_rregex(PG_FUNCTION_ARGS);
|
||||||
extern PGDLLEXPORT Datum _lt_q_regex(PG_FUNCTION_ARGS);
|
Datum _lt_q_regex(PG_FUNCTION_ARGS);
|
||||||
extern PGDLLEXPORT Datum _lt_q_rregex(PG_FUNCTION_ARGS);
|
Datum _lt_q_rregex(PG_FUNCTION_ARGS);
|
||||||
extern PGDLLEXPORT Datum _ltxtq_exec(PG_FUNCTION_ARGS);
|
Datum _ltxtq_exec(PG_FUNCTION_ARGS);
|
||||||
extern PGDLLEXPORT Datum _ltxtq_rexec(PG_FUNCTION_ARGS);
|
Datum _ltxtq_rexec(PG_FUNCTION_ARGS);
|
||||||
extern PGDLLEXPORT Datum _ltree_isparent(PG_FUNCTION_ARGS);
|
Datum _ltree_isparent(PG_FUNCTION_ARGS);
|
||||||
extern PGDLLEXPORT Datum _ltree_risparent(PG_FUNCTION_ARGS);
|
Datum _ltree_risparent(PG_FUNCTION_ARGS);
|
||||||
|
|
||||||
/* Concatenation functions */
|
/* Concatenation functions */
|
||||||
extern PGDLLEXPORT Datum ltree_addltree(PG_FUNCTION_ARGS);
|
Datum ltree_addltree(PG_FUNCTION_ARGS);
|
||||||
extern PGDLLEXPORT Datum ltree_addtext(PG_FUNCTION_ARGS);
|
Datum ltree_addtext(PG_FUNCTION_ARGS);
|
||||||
extern PGDLLEXPORT Datum ltree_textadd(PG_FUNCTION_ARGS);
|
Datum ltree_textadd(PG_FUNCTION_ARGS);
|
||||||
|
|
||||||
/* Util function */
|
/* Util function */
|
||||||
extern PGDLLEXPORT Datum ltree_in(PG_FUNCTION_ARGS);
|
Datum ltree_in(PG_FUNCTION_ARGS);
|
||||||
|
|
||||||
bool ltree_execute(ITEM *curitem, void *checkval,
|
bool ltree_execute(ITEM *curitem, void *checkval,
|
||||||
bool calcnot, bool (*chkcond) (void *checkval, ITEM *val));
|
bool calcnot, bool (*chkcond) (void *checkval, ITEM *val));
|
||||||
|
@ -2577,23 +2577,6 @@ concat_text(PG_FUNCTION_ARGS)
|
|||||||
error messages to this effect.
|
error messages to this effect.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
To work correctly on Windows, <literal>C</>-language functions need
|
|
||||||
to be marked with <literal>PGDLLEXPORT</>, unless you use a build
|
|
||||||
process that marks all global functions that way. In simple cases
|
|
||||||
this detail will be handled transparently by
|
|
||||||
the <literal>PG_FUNCTION_INFO_V1</> macro. However, if you write
|
|
||||||
explicit external declarations (perhaps in header files), be sure
|
|
||||||
to write them like this:
|
|
||||||
<programlisting>
|
|
||||||
extern PGDLLEXPORT Datum funcname(PG_FUNCTION_ARGS);
|
|
||||||
</programlisting>
|
|
||||||
or you'll get compiler complaints when building on Windows. (On
|
|
||||||
other platforms, the <literal>PGDLLEXPORT</> macro does nothing.)
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
</para>
|
</para>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
@ -350,11 +350,12 @@ typedef const Pg_finfo_record *(*PGFInfoFunction) (void);
|
|||||||
*
|
*
|
||||||
* On Windows, the function and info function must be exported. Our normal
|
* 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.
|
* build processes take care of that via .DEF files or --export-all-symbols.
|
||||||
* Module authors using a different build process might do it differently,
|
* Module authors using a different build process might need to manually
|
||||||
* so we declare these functions PGDLLEXPORT for their convenience.
|
* declare the function PGDLLEXPORT. We do that automatically here for the
|
||||||
|
* info function, since authors shouldn't need to be explicitly aware of it.
|
||||||
*/
|
*/
|
||||||
#define PG_FUNCTION_INFO_V1(funcname) \
|
#define PG_FUNCTION_INFO_V1(funcname) \
|
||||||
extern PGDLLEXPORT Datum funcname(PG_FUNCTION_ARGS); \
|
extern Datum funcname(PG_FUNCTION_ARGS); \
|
||||||
extern PGDLLEXPORT const Pg_finfo_record * CppConcat(pg_finfo_,funcname)(void); \
|
extern PGDLLEXPORT const Pg_finfo_record * CppConcat(pg_finfo_,funcname)(void); \
|
||||||
const Pg_finfo_record * \
|
const Pg_finfo_record * \
|
||||||
CppConcat(pg_finfo_,funcname) (void) \
|
CppConcat(pg_finfo_,funcname) (void) \
|
||||||
|
Loading…
Reference in New Issue
Block a user