Index: Modules/_ssl.c =================================================================== --- Modules/_ssl.c (revision 66634) +++ Modules/_ssl.c (working copy) @@ -34,6 +34,11 @@ #endif +/* current cygwin crashes on thread termination if uses setup_ssl_threads */ +#if defined(WITH_THREAD) && !defined(__CYGWIN__) +#define SETUP_SSL_THREADS +#endif + enum py_ssl_error { /* these mirror ssl.h */ PY_SSL_ERROR_NONE, @@ -1491,7 +1496,7 @@ }; -#ifdef WITH_THREAD +#ifdef SETUP_SSL_THREADS /* an implementation of OpenSSL threading operations in terms of the Python C thread library */ @@ -1556,7 +1561,7 @@ return 1; } -#endif /* def HAVE_THREAD */ +#endif /* def SETUP_SSL_THREADS */ PyDoc_STRVAR(module_doc, "Implementation module for SSL socket operations. See the socket module\n\ @@ -1580,7 +1585,7 @@ /* Init OpenSSL */ SSL_load_error_strings(); -#ifdef WITH_THREAD +#ifdef SETUP_SSL_THREADS /* note that this will start threading if not already started */ if (!_setup_ssl_threads()) { return;