| diff -Naur Python-3.8.0-orig/Modules/selectmodule.c Python-3.8.0/Modules/selectmodule.c |
| --- Python-3.8.0-orig/Modules/selectmodule.c 2019-10-14 16:34:47.000000000 +0300 |
| +++ Python-3.8.0/Modules/selectmodule.c 2019-10-22 10:01:32.759799600 +0300 |
| @@ -134,9 +134,9 @@ |
| v = PyObject_AsFileDescriptor( o ); |
| if (v == -1) goto finally; |
| |
| -#if defined(_MSC_VER) |
| +#if defined(MS_WIN32) |
| max = 0; /* not used for Win32 */ |
| -#else /* !_MSC_VER */ |
| +#else /* !MS_WIN32 */ |
| if (!_PyIsSelectable_fd(v)) { |
| PyErr_SetString(PyExc_ValueError, |
| "filedescriptor out of range in select()"); |
| @@ -144,7 +144,7 @@ |
| } |
| if (v > max) |
| max = v; |
| -#endif /* _MSC_VER */ |
| +#endif /* MS_WIN32 */ |
| FD_SET(v, set); |
| |
| /* add object and its file descriptor to the list */ |
| diff -Naur Python-3.8.0-orig/setup.py Python-3.8.0/setup.py |
| --- Python-3.8.0-orig/setup.py 2019-10-22 10:01:31.636597600 +0300 |
| +++ Python-3.8.0/setup.py 2019-10-22 10:01:33.181000400 +0300 |
| @@ -817,7 +817,11 @@ |
| self.missing.append('spwd') |
| |
| # select(2); not on ancient System V |
| - self.add(Extension('select', ['selectmodule.c'])) |
| + select_libs = [] |
| + if MS_WINDOWS: |
| + select_libs += ['ws2_32'] |
| + self.add(Extension('select', ['selectmodule.c'], |
| + libraries=select_libs)) |
| |
| # Fred Drake's interface to the Python parser |
| self.add(Extension('parser', ['parsermodule.c'])) |