Staging
v0.5.1
https://github.com/python/cpython
Revision c48b055258cfc31d8043af9c427e7a0e2980e60d authored by Benjamin Peterson on 06 March 2010, 20:37:32 UTC, committed by Benjamin Peterson on 06 March 2010, 20:37:32 UTC
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r78739 | benjamin.peterson | 2010-03-06 14:34:24 -0600 (Sat, 06 Mar 2010) | 10 lines

  Merged revisions 78718 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r78718 | gregory.p.smith | 2010-03-06 01:35:19 -0600 (Sat, 06 Mar 2010) | 3 lines

    Call setreuid and setregid in a subprocess to avoid altering the test runner's
    process state.  Should fix issue8045.
  ........
................
1 parent e4b56d2
Raw File
Tip revision: c48b055258cfc31d8043af9c427e7a0e2980e60d authored by Benjamin Peterson on 06 March 2010, 20:37:32 UTC
Merged revisions 78739 via svnmerge from
Tip revision: c48b055
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");
}
back to top