From: Myah Caron qsniyg@protonmail.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55614
Signed-off-by: Myah Caron qsniyg@protonmail.com --- dlls/msvcp110/msvcp110.spec | 4 +- dlls/msvcp120/msvcp120.spec | 4 +- dlls/msvcp120/tests/msvcp120.c | 106 ++++++++++++++++++ dlls/msvcp90/misc.c | 198 ++++++++++++++++++++++++--------- 4 files changed, 258 insertions(+), 54 deletions(-)
diff --git a/dlls/msvcp110/msvcp110.spec b/dlls/msvcp110/msvcp110.spec index 1a100676743..c96b6364d25 100644 --- a/dlls/msvcp110/msvcp110.spec +++ b/dlls/msvcp110/msvcp110.spec @@ -1827,8 +1827,8 @@ @ stub -arch=arm ?_W_Gettnames@_Locinfo@std@@QBA?AV_Timevec@2@XZ @ stub -arch=i386 ?_W_Gettnames@_Locinfo@std@@QBE?AV_Timevec@2@XZ @ stub -arch=win64 ?_W_Gettnames@_Locinfo@std@@QEBA?AV_Timevec@2@XZ -@ stub -arch=win32 ?_Winerror_map@std@@YAPBDH@Z -@ stub -arch=win64 ?_Winerror_map@std@@YAPEBDH@Z +@ cdecl -arch=win32 ?_Winerror_map@std@@YAPBDH@Z(long) _Winerror_map +@ cdecl -arch=win64 ?_Winerror_map@std@@YAPEBDH@Z(long) _Winerror_map @ cdecl ?_XLgamma@std@@YAMM@Z(float) std__XLgamma_float @ cdecl ?_XLgamma@std@@YANN@Z(double) std__XLgamma_double @ cdecl ?_XLgamma@std@@YAOO@Z(double) std__XLgamma_double diff --git a/dlls/msvcp120/msvcp120.spec b/dlls/msvcp120/msvcp120.spec index b95330179e5..73e7e5b3d7b 100644 --- a/dlls/msvcp120/msvcp120.spec +++ b/dlls/msvcp120/msvcp120.spec @@ -1788,8 +1788,8 @@ @ stub -arch=arm ?_W_Gettnames@_Locinfo@std@@QBA?AV_Timevec@2@XZ @ stub -arch=i386 ?_W_Gettnames@_Locinfo@std@@QBE?AV_Timevec@2@XZ @ stub -arch=win64 ?_W_Gettnames@_Locinfo@std@@QEBA?AV_Timevec@2@XZ -@ stub -arch=win32 ?_Winerror_map@std@@YAPBDH@Z -@ stub -arch=win64 ?_Winerror_map@std@@YAPEBDH@Z +@ cdecl -arch=win32 ?_Winerror_map@std@@YAPBDH@Z(long) _Winerror_map +@ cdecl -arch=win64 ?_Winerror_map@std@@YAPEBDH@Z(long) _Winerror_map @ cdecl ?_XLgamma@std@@YAMM@Z(float) std__XLgamma_float @ cdecl ?_XLgamma@std@@YANN@Z(double) std__XLgamma_double @ cdecl ?_XLgamma@std@@YAOO@Z(double) std__XLgamma_double diff --git a/dlls/msvcp120/tests/msvcp120.c b/dlls/msvcp120/tests/msvcp120.c index 060dda5b45f..bdef49cecbf 100644 --- a/dlls/msvcp120/tests/msvcp120.c +++ b/dlls/msvcp120/tests/msvcp120.c @@ -20,6 +20,7 @@ #include <stdio.h> #include <math.h> #include <limits.h> +#include <errno.h>
#include "wine/test.h" #include "winbase.h" @@ -221,6 +222,7 @@ static short (__cdecl *p__Dtest)(double *d); static short (__cdecl *p__Dscale)(double *d, int exp); static short (__cdecl *p__FExp)(float *x, float y, int exp); static const char* (__cdecl *p__Syserror_map)(int err); +static const char* (__cdecl *p__Winerror_map)(int err);
/* filesystem */ static ULONGLONG(__cdecl *p_tr2_sys__File_size)(char const*); @@ -584,6 +586,8 @@ static BOOL init(void) "?_Internal_resize@_Concurrent_vector_base_v4@details@Concurrency@@IEAAX_K00P6AXPEAX0@ZP6AX1PEBX0@Z3@Z"); SET(p__Syserror_map, "?_Syserror_map@std@@YAPEBDH@Z"); + SET(p__Winerror_map, + "?_Winerror_map@std@@YAPEBDH@Z"); } else { SET(p_tr2_sys__File_size, "?_File_size@sys@tr2@std@@YA_KPBD@Z"); @@ -659,6 +663,8 @@ static BOOL init(void) "?_Segment_index_of@_Concurrent_vector_base_v4@details@Concurrency@@KAII@Z"); SET(p__Syserror_map, "?_Syserror_map@std@@YAPBDH@Z"); + SET(p__Winerror_map, + "?_Winerror_map@std@@YAPBDH@Z"); #ifdef __i386__ SET(p_i386_Thrd_current, "_Thrd_current"); @@ -1191,6 +1197,105 @@ static void test__Syserror_map(void) ok(!r, "_Syserror_map(0) returned %p\n", r); }
+static void test__Winerror_map(void) +{ + int i; + const char* r; + static struct { + int winerr, doserr; + const char* str; + } tests[] = { + {-1, 0, NULL}, + {0, 0, NULL}, + {ERROR_INVALID_FUNCTION, ENOSYS}, + {ERROR_FILE_NOT_FOUND, ENOENT}, + {ERROR_PATH_NOT_FOUND, ENOENT}, + {ERROR_TOO_MANY_OPEN_FILES, EMFILE}, + {ERROR_ACCESS_DENIED, EACCES}, + {ERROR_INVALID_HANDLE, EINVAL}, + {ERROR_NOT_ENOUGH_MEMORY, ENOMEM}, + {ERROR_INVALID_ACCESS, EACCES}, + {ERROR_OUTOFMEMORY, ENOMEM}, + {ERROR_INVALID_DRIVE, ENODEV}, + {ERROR_CURRENT_DIRECTORY, EACCES}, + {ERROR_NOT_SAME_DEVICE, EXDEV}, + {ERROR_WRITE_PROTECT, EACCES}, + {ERROR_BAD_UNIT, ENODEV}, + {ERROR_NOT_READY, EAGAIN}, + {ERROR_SEEK, EIO}, + {ERROR_WRITE_FAULT, EIO}, + {ERROR_READ_FAULT, EIO}, + {ERROR_SHARING_VIOLATION, EACCES}, + {ERROR_LOCK_VIOLATION, ENOLCK}, + {ERROR_HANDLE_DISK_FULL, ENOSPC}, + {ERROR_NOT_SUPPORTED, ENOTSUP}, + {ERROR_DEV_NOT_EXIST, ENODEV}, + {ERROR_FILE_EXISTS, EEXIST}, + {ERROR_CANNOT_MAKE, EACCES}, + {ERROR_INVALID_PARAMETER, EINVAL}, + {ERROR_OPEN_FAILED, EIO}, + {ERROR_BUFFER_OVERFLOW, ENAMETOOLONG}, + {ERROR_DISK_FULL, ENOSPC}, + {ERROR_INVALID_NAME, ENOENT}, + {ERROR_NEGATIVE_SEEK, EINVAL}, + {ERROR_BUSY_DRIVE, EBUSY}, + {ERROR_DIR_NOT_EMPTY, ENOTEMPTY}, + {ERROR_BUSY, EBUSY}, + {ERROR_ALREADY_EXISTS, EEXIST}, + {ERROR_LOCKED, ENOLCK}, + {ERROR_DIRECTORY, EINVAL}, + {ERROR_OPERATION_ABORTED, ECANCELED}, + {ERROR_NOACCESS, EACCES}, + {ERROR_CANTOPEN, EIO}, + {ERROR_CANTREAD, EIO}, + {ERROR_CANTWRITE, EIO}, + {ERROR_RETRY, EAGAIN}, + {ERROR_OPEN_FILES, EBUSY}, + {ERROR_DEVICE_IN_USE, EBUSY}, + {ERROR_REPARSE_TAG_INVALID, EINVAL}, + {WSAEINTR, EINTR}, + {WSAEBADF, 0, "bad_file_descriptor"}, + {WSAEACCES, 0, "permission_denied"}, + {WSAEFAULT, 0, "bad_address"}, + {WSAEINVAL, 0, "invalid_argument"}, + {WSAEMFILE, 0, "too_many_files_open"}, + {WSAEWOULDBLOCK, 0, "operation_would_block"}, + {WSAEINPROGRESS, 0, "operation_in_progress"}, + {WSAEALREADY, 0, "connection_already_in_progress"}, + {WSAENOTSOCK, 0, "not_a_socket"}, + {WSAEDESTADDRREQ, 0, "destination_address_required"}, + {WSAEMSGSIZE, 0, "message_size"}, + {WSAEPROTOTYPE, 0, "wrong_protocol_type"}, + {WSAENOPROTOOPT, 0, "no_protocol_option"}, + {WSAEPROTONOSUPPORT, 0, "protocol_not_supported"}, + {WSAEOPNOTSUPP, 0, "operation_not_supported"}, + {WSAEAFNOSUPPORT, 0, "address_family_not_supported"}, + {WSAEADDRINUSE, 0, "address_in_use"}, + {WSAEADDRNOTAVAIL, 0, "address_not_available"}, + {WSAENETDOWN, 0, "network_down"}, + {WSAENETUNREACH, 0, "network_unreachable"}, + {WSAENETRESET, 0, "network_reset"}, + {WSAECONNABORTED, 0, "connection_aborted"}, + {WSAECONNRESET, 0, "connection_reset"}, + {WSAENOBUFS, 0, "no_buffer_space"}, + {WSAEISCONN, 0, "already_connected"}, + {WSAENOTCONN, 0, "not_connected"}, + {WSAETIMEDOUT, 0, "timed_out"}, + {WSAECONNREFUSED, 0, "connection_refused"}, + {WSAENAMETOOLONG, 0, "filename_too_long"}, + {WSAEHOSTUNREACH, 0, "host_unreachable"} + }; + + for (i=0; i<ARRAY_SIZE(tests); i++) + { + r = p__Winerror_map(tests[i].winerr); + if (!tests[i].str) + ok(r == p__Syserror_map(tests[i].doserr), "error %d returned: %s\n", tests[i].winerr, r); + else + ok(!strcmp(r, tests[i].str), "error %d returned: %s\n", tests[i].winerr, r); + } +} + static void test_tr2_sys__File_size(void) { ULONGLONG val; @@ -3349,6 +3454,7 @@ START_TEST(msvcp120) test__Dscale(); test__FExp(); test__Syserror_map(); + test__Winerror_map();
test_tr2_sys__File_size(); test_tr2_sys__Equivalent(); diff --git a/dlls/msvcp90/misc.c b/dlls/msvcp90/misc.c index ada8ee967d8..e2f02de8a3d 100644 --- a/dlls/msvcp90/misc.c +++ b/dlls/msvcp90/misc.c @@ -191,50 +191,121 @@ static const struct { {ETXTBSY, str_ETXTBSY}, {EWOULDBLOCK, str_EWOULDBLOCK}, }; -#endif
-#if _MSVCP_VER >= 140 +static const char str_WSAEBADF[] = "bad_file_descriptor"; +static const char str_WSAEACCES[] = "permission_denied"; +static const char str_WSAEFAULT[] = "bad_address"; +static const char str_WSAEINVAL[] = "invalid_argument"; +static const char str_WSAEMFILE[] = "too_many_files_open"; +static const char str_WSAEWOULDBLOCK[] = "operation_would_block"; +static const char str_WSAEINPROGRESS[] = "operation_in_progress"; +static const char str_WSAEALREADY[] = "connection_already_in_progress"; +static const char str_WSAENOTSOCK[] = "not_a_socket"; +static const char str_WSAEDESTADDRREQ[] = "destination_address_required"; +static const char str_WSAEMSGSIZE[] = "message_size"; +static const char str_WSAEPROTOTYPE[] = "wrong_protocol_type"; +static const char str_WSAENOPROTOOPT[] = "no_protocol_option"; +static const char str_WSAEPROTONOSUPPORT[] = "protocol_not_supported"; +static const char str_WSAEOPNOTSUPP[] = "operation_not_supported"; +static const char str_WSAEAFNOSUPPORT[] = "address_family_not_supported"; +static const char str_WSAEADDRINUSE[] = "address_in_use"; +static const char str_WSAEADDRNOTAVAIL[] = "address_not_available"; +static const char str_WSAENETDOWN[] = "network_down"; +static const char str_WSAENETUNREACH[] = "network_unreachable"; +static const char str_WSAENETRESET[] = "network_reset"; +static const char str_WSAECONNABORTED[] = "connection_aborted"; +static const char str_WSAECONNRESET[] = "connection_reset"; +static const char str_WSAENOBUFS[] = "no_buffer_space"; +static const char str_WSAEISCONN[] = "already_connected"; +static const char str_WSAENOTCONN[] = "not_connected"; +static const char str_WSAETIMEDOUT[] = "timed_out"; +static const char str_WSAECONNREFUSED[] = "connection_refused"; +static const char str_WSAENAMETOOLONG[] = "filename_too_long"; +static const char str_WSAEHOSTUNREACH[] = "host_unreachable"; + static const struct { int winerr; int doserr; + const char* str; } winerror_map[] = { - {ERROR_INVALID_FUNCTION, ENOSYS}, {ERROR_FILE_NOT_FOUND, ENOENT}, - {ERROR_PATH_NOT_FOUND, ENOENT}, {ERROR_TOO_MANY_OPEN_FILES, EMFILE}, - {ERROR_ACCESS_DENIED, EACCES}, {ERROR_INVALID_HANDLE, EINVAL}, - {ERROR_NOT_ENOUGH_MEMORY, ENOMEM}, {ERROR_INVALID_ACCESS, EACCES}, - {ERROR_OUTOFMEMORY, ENOMEM}, {ERROR_INVALID_DRIVE, ENODEV}, - {ERROR_CURRENT_DIRECTORY, EACCES}, {ERROR_NOT_SAME_DEVICE, EXDEV}, - {ERROR_WRITE_PROTECT, EACCES}, {ERROR_BAD_UNIT, ENODEV}, - {ERROR_NOT_READY, EAGAIN}, {ERROR_SEEK, EIO}, {ERROR_WRITE_FAULT, EIO}, - {ERROR_READ_FAULT, EIO}, {ERROR_SHARING_VIOLATION, EACCES}, - {ERROR_LOCK_VIOLATION, ENOLCK}, {ERROR_HANDLE_DISK_FULL, ENOSPC}, - {ERROR_NOT_SUPPORTED, ENOTSUP}, {ERROR_DEV_NOT_EXIST, ENODEV}, - {ERROR_FILE_EXISTS, EEXIST}, {ERROR_CANNOT_MAKE, EACCES}, - {ERROR_INVALID_PARAMETER, EINVAL}, {ERROR_OPEN_FAILED, EIO}, - {ERROR_BUFFER_OVERFLOW, ENAMETOOLONG}, {ERROR_DISK_FULL, ENOSPC}, - {ERROR_INVALID_NAME, ENOENT}, {ERROR_NEGATIVE_SEEK, EINVAL}, - {ERROR_BUSY_DRIVE, EBUSY}, {ERROR_DIR_NOT_EMPTY, ENOTEMPTY}, - {ERROR_BUSY, EBUSY}, {ERROR_ALREADY_EXISTS, EEXIST}, - {ERROR_LOCKED, ENOLCK}, {ERROR_DIRECTORY, EINVAL}, - {ERROR_OPERATION_ABORTED, ECANCELED}, {ERROR_NOACCESS, EACCES}, - {ERROR_CANTOPEN, EIO}, {ERROR_CANTREAD, EIO}, {ERROR_CANTWRITE, EIO}, - {ERROR_RETRY, EAGAIN}, {ERROR_OPEN_FILES, EBUSY}, - {ERROR_DEVICE_IN_USE, EBUSY}, {ERROR_REPARSE_TAG_INVALID, EINVAL}, - {WSAEINTR, EINTR}, {WSAEBADF, EBADF}, {WSAEACCES, EACCES}, - {WSAEFAULT, EFAULT}, {WSAEINVAL, EINVAL}, {WSAEMFILE, EMFILE}, - {WSAEWOULDBLOCK, EWOULDBLOCK}, {WSAEINPROGRESS, EINPROGRESS}, - {WSAEALREADY, EALREADY}, {WSAENOTSOCK, ENOTSOCK}, - {WSAEDESTADDRREQ, EDESTADDRREQ}, {WSAEMSGSIZE, EMSGSIZE}, - {WSAEPROTOTYPE, EPROTOTYPE}, {WSAENOPROTOOPT, ENOPROTOOPT}, - {WSAEPROTONOSUPPORT, EPROTONOSUPPORT}, {WSAEOPNOTSUPP, EOPNOTSUPP}, - {WSAEAFNOSUPPORT, EAFNOSUPPORT}, {WSAEADDRINUSE, EADDRINUSE}, - {WSAEADDRNOTAVAIL, EADDRNOTAVAIL}, {WSAENETDOWN, ENETDOWN}, - {WSAENETUNREACH, ENETUNREACH}, {WSAENETRESET, ENETRESET}, - {WSAECONNABORTED, ECONNABORTED}, {WSAECONNRESET, ECONNRESET}, - {WSAENOBUFS, ENOBUFS}, {WSAEISCONN, EISCONN}, {WSAENOTCONN, ENOTCONN}, - {WSAETIMEDOUT, ETIMEDOUT}, {WSAECONNREFUSED, ECONNREFUSED}, - {WSAENAMETOOLONG, ENAMETOOLONG}, {WSAEHOSTUNREACH, EHOSTUNREACH} + {ERROR_INVALID_FUNCTION, ENOSYS}, + {ERROR_FILE_NOT_FOUND, ENOENT}, + {ERROR_PATH_NOT_FOUND, ENOENT}, + {ERROR_TOO_MANY_OPEN_FILES, EMFILE}, + {ERROR_ACCESS_DENIED, EACCES}, + {ERROR_INVALID_HANDLE, EINVAL}, + {ERROR_NOT_ENOUGH_MEMORY, ENOMEM}, + {ERROR_INVALID_ACCESS, EACCES}, + {ERROR_OUTOFMEMORY, ENOMEM}, + {ERROR_INVALID_DRIVE, ENODEV}, + {ERROR_CURRENT_DIRECTORY, EACCES}, + {ERROR_NOT_SAME_DEVICE, EXDEV}, + {ERROR_WRITE_PROTECT, EACCES}, + {ERROR_BAD_UNIT, ENODEV}, + {ERROR_NOT_READY, EAGAIN}, + {ERROR_SEEK, EIO}, + {ERROR_WRITE_FAULT, EIO}, + {ERROR_READ_FAULT, EIO}, + {ERROR_SHARING_VIOLATION, EACCES}, + {ERROR_LOCK_VIOLATION, ENOLCK}, + {ERROR_HANDLE_DISK_FULL, ENOSPC}, + {ERROR_NOT_SUPPORTED, ENOTSUP}, + {ERROR_DEV_NOT_EXIST, ENODEV}, + {ERROR_FILE_EXISTS, EEXIST}, + {ERROR_CANNOT_MAKE, EACCES}, + {ERROR_INVALID_PARAMETER, EINVAL}, + {ERROR_OPEN_FAILED, EIO}, + {ERROR_BUFFER_OVERFLOW, ENAMETOOLONG}, + {ERROR_DISK_FULL, ENOSPC}, + {ERROR_INVALID_NAME, ENOENT}, + {ERROR_NEGATIVE_SEEK, EINVAL}, + {ERROR_BUSY_DRIVE, EBUSY}, + {ERROR_DIR_NOT_EMPTY, ENOTEMPTY}, + {ERROR_BUSY, EBUSY}, + {ERROR_ALREADY_EXISTS, EEXIST}, + {ERROR_LOCKED, ENOLCK}, + {ERROR_DIRECTORY, EINVAL}, + {ERROR_OPERATION_ABORTED, ECANCELED}, + {ERROR_NOACCESS, EACCES}, + {ERROR_CANTOPEN, EIO}, + {ERROR_CANTREAD, EIO}, + {ERROR_CANTWRITE, EIO}, + {ERROR_RETRY, EAGAIN}, + {ERROR_OPEN_FILES, EBUSY}, + {ERROR_DEVICE_IN_USE, EBUSY}, + {ERROR_REPARSE_TAG_INVALID, EINVAL}, + {WSAEINTR, EINTR}, + {WSAEBADF, EBADF, str_WSAEBADF}, + {WSAEACCES, EACCES, str_WSAEACCES}, + {WSAEFAULT, EFAULT, str_WSAEFAULT}, + {WSAEINVAL, EINVAL, str_WSAEINVAL}, + {WSAEMFILE, EMFILE, str_WSAEMFILE}, + {WSAEWOULDBLOCK, EWOULDBLOCK, str_WSAEWOULDBLOCK}, + {WSAEINPROGRESS, EINPROGRESS, str_WSAEINPROGRESS}, + {WSAEALREADY, EALREADY, str_WSAEALREADY}, + {WSAENOTSOCK, ENOTSOCK, str_WSAENOTSOCK}, + {WSAEDESTADDRREQ, EDESTADDRREQ, str_WSAEDESTADDRREQ}, + {WSAEMSGSIZE, EMSGSIZE, str_WSAEMSGSIZE}, + {WSAEPROTOTYPE, EPROTOTYPE, str_WSAEPROTOTYPE}, + {WSAENOPROTOOPT, ENOPROTOOPT, str_WSAENOPROTOOPT}, + {WSAEPROTONOSUPPORT, EPROTONOSUPPORT, str_WSAEPROTONOSUPPORT}, + {WSAEOPNOTSUPP, EOPNOTSUPP, str_WSAEOPNOTSUPP}, + {WSAEAFNOSUPPORT, EAFNOSUPPORT, str_WSAEAFNOSUPPORT}, + {WSAEADDRINUSE, EADDRINUSE, str_WSAEADDRINUSE}, + {WSAEADDRNOTAVAIL, EADDRNOTAVAIL, str_WSAEADDRNOTAVAIL}, + {WSAENETDOWN, ENETDOWN, str_WSAENETDOWN}, + {WSAENETUNREACH, ENETUNREACH, str_WSAENETUNREACH}, + {WSAENETRESET, ENETRESET, str_WSAENETRESET}, + {WSAECONNABORTED, ECONNABORTED, str_WSAECONNABORTED}, + {WSAECONNRESET, ECONNRESET, str_WSAECONNRESET}, + {WSAENOBUFS, ENOBUFS, str_WSAENOBUFS}, + {WSAEISCONN, EISCONN, str_WSAEISCONN}, + {WSAENOTCONN, ENOTCONN, str_WSAENOTCONN}, + {WSAETIMEDOUT, ETIMEDOUT, str_WSAETIMEDOUT}, + {WSAECONNREFUSED, ECONNREFUSED, str_WSAECONNREFUSED}, + {WSAENAMETOOLONG, ENAMETOOLONG, str_WSAENAMETOOLONG}, + {WSAEHOSTUNREACH, EHOSTUNREACH, str_WSAEHOSTUNREACH} }; #endif
@@ -1681,6 +1752,26 @@ const char* __cdecl _Syserror_map(int err) } #endif
+#if _MSVCP_VER >= 110 +static int find_in_winerror_map(int err) +{ + int low = 0, high = ARRAY_SIZE(winerror_map) - 1, mid; + + while(low <= high) + { + mid = (low + high) / 2; + + if(err == winerror_map[mid].winerr) + return mid; + if(err > winerror_map[mid].winerr) + low = mid + 1; + else + high = mid - 1; + } + + return -1; +} + #if _MSVCP_VER >= 140 /* ?_Winerror_message@std@@YAKKPADK@Z */ /* ?_Winerror_message@std@@YAKKPEADK@Z */ @@ -1695,23 +1786,30 @@ ULONG __cdecl _Winerror_message(ULONG err, char *buf, ULONG size) /* ?_Winerror_map@std@@YAHH@Z */ int __cdecl _Winerror_map(int err) { - int low = 0, high = ARRAY_SIZE(winerror_map) - 1, mid; + int i = find_in_winerror_map(err);
- while(low <= high) - { - mid = (low + high) / 2; + if (i < 0) + return 0; + else + return winerror_map[i].doserr; +} +#else +/* ?_Winerror_map@std@@YAPBDH@Z */ +/* ?_Winerror_map@std@@YAPEBDH@Z */ +char const * __cdecl _Winerror_map(int err) +{ + int i = find_in_winerror_map(err);
- if(err == winerror_map[mid].winerr) - return winerror_map[mid].doserr; - if(err > winerror_map[mid].winerr) - low = mid + 1; - else - high = mid - 1; - } + if (i < 0) + return NULL;
- return 0; + if (winerror_map[i].str) + return winerror_map[i].str; + + return _Syserror_map(winerror_map[i].doserr); } #endif +#endif
#if _MSVCP_VER >= 100 __ASM_BLOCK_BEGIN(misc_vtables)