Staging
v0.8.1
v0.8.1
Revision 0fc940a09ae6636e78f94ecf6436b8de14bd1c45 authored by Victor Stinner on 24 July 2017, 11:01:59 UTC, committed by GitHub on 24 July 2017, 11:01:59 UTC
bpo-30850: On Windows, test04_lock_timeout2() now tolerates 50 ms whereas 100 ms is expected. The lock sometimes times out after only 58 ms. Windows clocks have a bad resolution and bad accuracy.
1 parent 123a58b
generrmap.c
#include <stdio.h>
#include <errno.h>
/* Extract the mapping of Win32 error codes to errno */
int main()
{
int i;
printf("/* Generated file. Do not edit. */\n");
printf("int winerror_to_errno(int winerror)\n");
printf("{\n\tswitch(winerror) {\n");
for(i=1; i < 65000; i++) {
_dosmaperr(i);
if (errno == EINVAL)
continue;
printf("\t\tcase %d: return %d;\n", i, errno);
}
printf("\t\tdefault: return EINVAL;\n");
printf("\t}\n}\n");
}
Computing file changes ...