* Initial python-3.7 port * python3: Add setup.config.in to remove before patching * python3: Implement setenv for mingw. Fix building with NT threads. Build with unicode * Fix typos * Fix linking core modules * Mingw build have exec_prefix * Remove deprecated patch * Fix building python and modules. Failing to build readline module and install not working yet * More getpath changes and more aggressive path separator conversion * Fix readline module compilation and linking errors * python3: By default building with posix threads, NT threads are broken. Some patches optimization. First buildable commit * Py_DecodeLocale handle char, not wchar * Fix building multiprocessing module with posix threads
41 lines
1.6 KiB
Diff
41 lines
1.6 KiB
Diff
diff -Naur Python-3.7.0-orig/Modules/selectmodule.c Python-3.7.0/Modules/selectmodule.c
|
|
--- Python-3.7.0-orig/Modules/selectmodule.c 2018-06-27 06:07:35.000000000 +0300
|
|
+++ Python-3.7.0/Modules/selectmodule.c 2018-06-30 11:16:15.678621400 +0300
|
|
@@ -106,9 +106,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()");
|
|
@@ -116,7 +116,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.7.0-orig/setup.py Python-3.7.0/setup.py
|
|
--- Python-3.7.0-orig/setup.py 2018-06-30 11:16:15.429021000 +0300
|
|
+++ Python-3.7.0/setup.py 2018-06-30 11:16:15.678621400 +0300
|
|
@@ -742,7 +742,11 @@
|
|
missing.append('spwd')
|
|
|
|
# select(2); not on ancient System V
|
|
- exts.append( Extension('select', ['selectmodule.c']) )
|
|
+ select_libs = []
|
|
+ if host_platform.startswith(('mingw', 'win')):
|
|
+ select_libs += ['ws2_32']
|
|
+ exts.append( Extension('select', ['selectmodule.c'],
|
|
+ libraries=select_libs) )
|
|
|
|
# Fred Drake's interface to the Python parser
|
|
exts.append( Extension('parser', ['parsermodule.c']) )
|