Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4f52fd3

Browse files
committed
Revert addition of PGDLLEXPORT in PG_FUNCTION_INFO_V1 macro.
This turns out not to be as harmless as I thought: MSVC will complainif it sees an "extern" declaration without PGDLLEXPORT and then one with.(Seems fairly silly, given that this can be changed after the fact by thelinker, but there you have it.) Therefore, contrib modules that haveextern's for V1 functions in header files are falling over in thebuildfarm, since none of those externs are marked PGDLLEXPORT.We might or might not conclude that we're willing to plaster thosedeclarations with PGDLLEXPORT in HEAD, but in any case there's no way we'regoing to ship this change in the back branches. Third-party authors wouldnot thank us for breaking their code in a minor release. Hence, revertthe addition of PGDLLEXPORT (but let's keep the extra info in the comment).If we do the other changes we can revert this commit in HEAD.Per buildfarm.
1 parentc0a3b21 commit4f52fd3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎src/include/fmgr.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,11 +350,12 @@ typedef const Pg_finfo_record *(*PGFInfoFunction) (void);
350350
*
351351
*On Windows, the function and info function must be exported. Our normal
352352
*build processes take care of that via .DEF files or --export-all-symbols.
353-
*We add PGDLLEXPORT nonetheless so that C functions built with a
354-
*different build process are guaranteed to be exported.
353+
*Module authors using a different build process might need to manually
354+
*declare the function PGDLLEXPORT. We do that automatically here for the
355+
*info function, since authors shouldn't need to be explicitly aware of it.
355356
*/
356357
#definePG_FUNCTION_INFO_V1(funcname) \
357-
externPGDLLEXPORTDatum funcname(PG_FUNCTION_ARGS); \
358+
extern Datum funcname(PG_FUNCTION_ARGS); \
358359
extern PGDLLEXPORT const Pg_finfo_record * CppConcat(pg_finfo_,funcname)(void); \
359360
const Pg_finfo_record * \
360361
CppConcat(pg_finfo_,funcname) (void) \

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp