Staging
v0.8.1
v0.8.1
Revision 5a435eac1b83f080c9dfceff0de0d639541e4bcb authored by Miss Islington (bot) on 12 September 2018, 21:11:45 UTC, committed by GitHub on 12 September 2018, 21:11:45 UTC
Returning EINTR from pthread semaphore or lock acquisition is an optional POSIX feature. musl does not provide this feature, so some threadsignal tests fail when Python is built against it. There's no good way to test for musl, so we skip if we're on Linux and not using glibc pthreads. Also, hedge in the threading documentation about when we can provide interrupts from lock acquisition. (cherry picked from commit 5b10d5111d7a855297654af9045f8907b7d3dd08) Co-authored-by: Benjamin Peterson <benjamin@python.org>
1 parent aa12534
generrmap.c
#include <windows.h>
#include <fcntl.h>
#include <io.h>
#include <stdio.h>
#include <errno.h>
/* Extract the mapping of Win32 error codes to errno */
int main()
{
int i;
_setmode(fileno(stdout), O_BINARY);
printf("/* Generated file. Do not edit. */\n");
printf("int winerror_to_errno(int winerror)\n");
printf("{\n switch(winerror) {\n");
for(i=1; i < 65000; i++) {
_dosmaperr(i);
if (errno == EINVAL) {
/* Issue #12802 */
if (i == ERROR_DIRECTORY)
errno = ENOTDIR;
/* Issue #13063 */
else if (i == ERROR_NO_DATA)
errno = EPIPE;
else
continue;
}
printf(" case %d: return %d;\n", i, errno);
}
printf(" default: return EINVAL;\n");
printf(" }\n}\n");
}
Computing file changes ...