#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;elsecontinue;}printf(" case %d: return %d;\n", i, errno);}printf(" default: return EINVAL;\n");printf(" }\n}\n");}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。