bpo-45847: Fix _multiprocessing on platforms without sem_open (GH-29833)

This commit is contained in:
Christian Heimes 2021-11-29 11:36:10 +02:00 committed by GitHub
parent 87d5180b7a
commit 4dc198dedd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 84 additions and 11 deletions

View file

@ -21,9 +21,11 @@
# endif
# define SEM_HANDLE HANDLE
# define SEM_VALUE_MAX LONG_MAX
# define HAVE_MP_SEMAPHORE
#else
# include <fcntl.h> /* O_CREAT and O_EXCL */
# if defined(HAVE_SEM_OPEN) && !defined(POSIX_SEMAPHORES_NOT_ENABLED)
# define HAVE_MP_SEMAPHORE
# include <semaphore.h>
typedef sem_t *SEM_HANDLE;
# endif