Skip to content

Commit 0e497ea

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 as no symbols are declared with __declspec(dllexport). But we can end up with some, e.g. plpython's Py_Init. It's quite possible we should do the same for cygwin, but I don't have a test environment for that... Discussion: http://postgr.es/m/20220928022724.erzuk5v4ai4b53do@awork3.anarazel.de Discussion: http://postgr.es/m/20220928025242.ugf7t5ugxxgmkraa@awork3.anarazel.de
1 parent 4e4f7b9 commit 0e497ea

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
#define PGDLLEXPORT __declspec (dllexport)
57-
#endif

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy