Last change
on this file was 391, checked in by dmik, 11 years ago |
python: Merge vendor 2.7.6 to trunk.
|
-
Property svn:eol-style
set to
native
|
File size:
503 bytes
|
Rev | Line | |
---|
[2] | 1 | #include <stdio.h>
|
---|
| 2 | #include <errno.h>
|
---|
| 3 |
|
---|
| 4 | /* Extract the mapping of Win32 error codes to errno */
|
---|
| 5 |
|
---|
| 6 | int main()
|
---|
| 7 | {
|
---|
[391] | 8 | int i;
|
---|
| 9 | printf("/* Generated file. Do not edit. */\n");
|
---|
| 10 | printf("int winerror_to_errno(int winerror)\n");
|
---|
| 11 | printf("{\n\tswitch(winerror) {\n");
|
---|
| 12 | for(i=1; i < 65000; i++) {
|
---|
| 13 | _dosmaperr(i);
|
---|
| 14 | if (errno == EINVAL)
|
---|
| 15 | continue;
|
---|
| 16 | printf("\t\tcase %d: return %d;\n", i, errno);
|
---|
| 17 | }
|
---|
| 18 | printf("\t\tdefault: return EINVAL;\n");
|
---|
| 19 | printf("\t}\n}\n");
|
---|
[2] | 20 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.