SF patch 404928: Support for next Cygwin gcc (2.95.2-8)
diff --git a/Modules/_sre.c b/Modules/_sre.c
index 3d4054a..63e4ef3 100644
--- a/Modules/_sre.c
+++ b/Modules/_sre.c
@@ -2369,10 +2369,7 @@
     {NULL, NULL}
 };
 
-void
-#if defined(WIN32)
-__declspec(dllexport)
-#endif
+DL_EXPORT(void)
 init_sre(void)
 {
     PyObject* m;
diff --git a/Modules/gdbmmodule.c b/Modules/gdbmmodule.c
index 91bebbd..5f83a28 100644
--- a/Modules/gdbmmodule.c
+++ b/Modules/gdbmmodule.c
@@ -11,7 +11,7 @@
 #include <fcntl.h>
 #include "gdbm.h"
 
-#ifdef WIN32
+#if defined(WIN32) && !defined(__CYGWIN__)
 #include "gdbmerrno.h"
 extern const char * gdbm_strerror(gdbm_error);
 #endif
diff --git a/Python/exceptions.c b/Python/exceptions.c
index c020def..0c61c5d 100644
--- a/Python/exceptions.c
+++ b/Python/exceptions.c
@@ -1042,10 +1042,7 @@
 
 
 
-void
-#ifdef WIN32
-__declspec(dllexport)
-#endif /* WIN32 */
+DL_EXPORT(void)
 init_exceptions(void)
 {
     char *modulename = "exceptions";
@@ -1128,10 +1125,7 @@
 }
 
 
-void
-#ifdef WIN32
-__declspec(dllexport)
-#endif /* WIN32 */
+DL_EXPORT(void)
 fini_exceptions(void)
 {
     int i;