Cross-Platform build scripts for audio plugins
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.5KB

  1. diff -Naur Python-3.8.0-orig/Modules/selectmodule.c Python-3.8.0/Modules/selectmodule.c
  2. --- Python-3.8.0-orig/Modules/selectmodule.c 2019-10-14 16:34:47.000000000 +0300
  3. +++ Python-3.8.0/Modules/selectmodule.c 2019-10-22 10:01:32.759799600 +0300
  4. @@ -134,9 +134,9 @@
  5. v = PyObject_AsFileDescriptor( o );
  6. if (v == -1) goto finally;
  7. -#if defined(_MSC_VER)
  8. +#if defined(MS_WIN32)
  9. max = 0; /* not used for Win32 */
  10. -#else /* !_MSC_VER */
  11. +#else /* !MS_WIN32 */
  12. if (!_PyIsSelectable_fd(v)) {
  13. PyErr_SetString(PyExc_ValueError,
  14. "filedescriptor out of range in select()");
  15. @@ -144,7 +144,7 @@
  16. }
  17. if (v > max)
  18. max = v;
  19. -#endif /* _MSC_VER */
  20. +#endif /* MS_WIN32 */
  21. FD_SET(v, set);
  22. /* add object and its file descriptor to the list */
  23. diff -Naur Python-3.8.0-orig/setup.py Python-3.8.0/setup.py
  24. --- Python-3.8.0-orig/setup.py 2019-10-22 10:01:31.636597600 +0300
  25. +++ Python-3.8.0/setup.py 2019-10-22 10:01:33.181000400 +0300
  26. @@ -817,7 +817,11 @@
  27. self.missing.append('spwd')
  28. # select(2); not on ancient System V
  29. - self.add(Extension('select', ['selectmodule.c']))
  30. + select_libs = []
  31. + if MS_WINDOWS:
  32. + select_libs += ['ws2_32']
  33. + self.add(Extension('select', ['selectmodule.c'],
  34. + libraries=select_libs))
  35. # Fred Drake's interface to the Python parser
  36. self.add(Extension('parser', ['parsermodule.c']))