mirror of
https://github.com/postgres/postgres.git
synced 2025-10-29 22:49:41 +03:00
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
This commit is contained in:
@@ -49,9 +49,11 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Under MSVC, functions exported by a loadable module must be marked
|
* Functions exported by a loadable module must be marked "dllexport".
|
||||||
* "dllexport". Other compilers don't need that.
|
*
|
||||||
|
* 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.
|
||||||
*/
|
*/
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define PGDLLEXPORT __declspec (dllexport)
|
#define PGDLLEXPORT __declspec (dllexport)
|
||||||
#endif
|
|
||||||
|
|||||||
Reference in New Issue
Block a user