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.

44 lines
1.6KB

  1. diff -Naur Python-3.8.0-orig/Include/internal/pycore_condvar.h Python-3.8.0/Include/internal/pycore_condvar.h
  2. --- Python-3.8.0-orig/Include/internal/pycore_condvar.h 2019-10-14 16:34:47.000000000 +0300
  3. +++ Python-3.8.0/Include/internal/pycore_condvar.h 2019-10-22 10:02:30.231300600 +0300
  4. @@ -5,6 +5,12 @@
  5. # error "this header requires Py_BUILD_CORE define"
  6. #endif
  7. +#ifdef __MINGW32__
  8. +# if !defined(HAVE_PTHREAD_H) || defined(NT_THREADS)
  9. +# undef _POSIX_THREADS
  10. +# endif
  11. +#endif
  12. +
  13. #ifndef _POSIX_THREADS
  14. /* This means pthreads are not implemented in libc headers, hence the macro
  15. not present in unistd.h. But they still can be implemented as an external
  16. @@ -37,6 +43,10 @@
  17. /* include windows if it hasn't been done before */
  18. #define WIN32_LEAN_AND_MEAN
  19. #include <windows.h>
  20. +/* winpthreads are involved via windows header, so need undef _POSIX_THREADS after header include */
  21. +#if defined(_POSIX_THREADS)
  22. +#undef _POSIX_THREADS
  23. +#endif
  24. /* options */
  25. /* non-emulated condition variables are provided for those that want
  26. diff -Naur Python-3.8.0-orig/Include/pythread.h Python-3.8.0/Include/pythread.h
  27. --- Python-3.8.0-orig/Include/pythread.h 2019-10-14 16:34:47.000000000 +0300
  28. +++ Python-3.8.0/Include/pythread.h 2019-10-22 10:02:30.652501400 +0300
  29. @@ -9,6 +9,12 @@
  30. extern "C" {
  31. #endif
  32. +#ifdef __MINGW32__
  33. +# if !defined(HAVE_PTHREAD_H) || defined(NT_THREADS)
  34. +# undef _POSIX_THREADS
  35. +# endif
  36. +#endif
  37. +
  38. /* Return status codes for Python lock acquisition. Chosen for maximum
  39. * backwards compatibility, ie failure -> 0, success -> 1. */
  40. typedef enum PyLockStatus {