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

Commit0e497ea

Browse files
committed
mingw: Define PGDLLEXPORT as __declspec (dllexport) as done for msvc
While mingw would otherwise fall back to__attribute__((visibility("default"))), that appears to only work as long asno symbols are declared with __declspec(dllexport). But we can end up withsome, e.g. plpython's Py_Init.It's quite possible we should do the same for cygwin, but I don't have a testenvironment for that...Discussion:http://postgr.es/m/20220928022724.erzuk5v4ai4b53do@awork3.anarazel.deDiscussion:http://postgr.es/m/20220928025242.ugf7t5ugxxgmkraa@awork3.anarazel.de
1 parent4e4f7b9 commit0e497ea

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

‎src/include/port/win32.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,11 @@
4949
#endif
5050

5151
/*
52-
* Under MSVC, functions exported by a loadable module must be marked
53-
* "dllexport". Other compilers don't need that.
52+
* Functions exported by a loadable module must be marked "dllexport".
53+
*
54+
* While mingw would otherwise fall back to
55+
* __attribute__((visibility("default"))), that appears to only work as long
56+
* as no symbols are declared with __declspec(dllexport). But we can end up
57+
* with some, e.g. plpython's Py_Init.
5458
*/
55-
#ifdef_MSC_VER
5659
#definePGDLLEXPORT __declspec (dllexport)
57-
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp