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[email protected]
Discussion: http://postgr.es/m/
20220928025242[email protected]
#endif
/*
- * Under MSVC, functions exported by a loadable module must be marked
- * "dllexport". Other compilers don't need that.
+ * Functions exported by a loadable module must be marked "dllexport".
+ *
+ * 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)
-#endif