mingw: Define PGDLLEXPORT as __declspec (dllexport) as done for msvc
authorAndres Freund <andres@anarazel.de>
Wed, 28 Sep 2022 17:16:49 +0000 (10:16 -0700)
committerAndres Freund <andres@anarazel.de>
Fri, 30 Sep 2022 17:50:05 +0000 (10:50 -0700)
commit0e497eadb1f4028b147b5c58dc08cea7e73675e1
tree380f50610e254822206bb0e645d5f3ff898c925f
parent4e4f7b9fcc9ad0b023b6e698e978882d022b94c4
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
src/include/port/win32.h