diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index 4323e457a50..646137daa0e 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -1609,7 +1609,7 @@ @ cdecl _wtof_l(wstr ptr) msvcrt._wtof_l @ cdecl _wtoi(wstr) msvcrt._wtoi @ cdecl -ret64 _wtoi64(wstr) msvcrt._wtoi64 -@ stub _wtoi64_l +@ cdecl -ret64 _wtoi64_l(wstr ptr) msvcrt._wtoi64_l @ cdecl _wtoi_l(wstr ptr) msvcrt._wtoi_l @ cdecl _wtol(wstr) msvcrt._wtol @ cdecl _wtol_l(wstr ptr) msvcrt._wtol_l diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index 57bd10747ac..b82a58e02ed 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -1967,7 +1967,7 @@ @ cdecl _wtof_l(wstr ptr) msvcrt._wtof_l @ cdecl _wtoi(wstr) msvcrt._wtoi @ cdecl -ret64 _wtoi64(wstr) msvcrt._wtoi64 -@ stub _wtoi64_l +@ cdecl -ret64 _wtoi64_l(wstr ptr) msvcrt._wtoi64_l @ cdecl _wtoi_l(wstr ptr) msvcrt._wtoi_l @ cdecl _wtol(wstr) msvcrt._wtol @ cdecl _wtol_l(wstr ptr) msvcrt._wtol_l diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index b70d4fb9c5a..0a0adf654a5 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -1291,7 +1291,7 @@ @ cdecl _wtof_l(wstr ptr) msvcrt._wtof_l @ cdecl _wtoi(wstr) msvcrt._wtoi @ cdecl -ret64 _wtoi64(wstr) msvcrt._wtoi64 -@ stub _wtoi64_l +@ cdecl -ret64 _wtoi64_l(wstr ptr) msvcrt._wtoi64_l @ cdecl _wtoi_l(wstr ptr) msvcrt._wtoi_l @ cdecl _wtol(wstr) msvcrt._wtol @ cdecl _wtol_l(wstr ptr) msvcrt._wtol_l diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index 36cf2e4a8b6..382a52e717c 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -1264,7 +1264,7 @@ @ cdecl _wtof_l(wstr ptr) msvcrt._wtof_l @ cdecl _wtoi(wstr) msvcrt._wtoi @ cdecl -ret64 _wtoi64(wstr) msvcrt._wtoi64 -@ stub _wtoi64_l +@ cdecl -ret64 _wtoi64_l(wstr ptr) msvcrt._wtoi64_l @ cdecl _wtoi_l(wstr ptr) msvcrt._wtoi_l @ cdecl _wtol(wstr) msvcrt._wtol @ cdecl _wtol_l(wstr ptr) msvcrt._wtol_l diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 7cfc3704461..acf53aa58c2 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -1229,8 +1229,8 @@ @ cdecl _wtof(wstr) MSVCRT__wtof @ cdecl _wtof_l(wstr ptr) MSVCRT__wtof_l @ cdecl _wtoi(wstr) MSVCRT__wtoi -@ cdecl -ret64 _wtoi64(wstr) ntdll._wtoi64 -# stub -ret64 _wtoi64_l(wstr ptr) +@ cdecl -ret64 _wtoi64(wstr) +@ cdecl -ret64 _wtoi64_l(wstr ptr) @ cdecl _wtoi_l(wstr ptr) MSVCRT__wtoi_l @ cdecl _wtol(wstr) MSVCRT__wtol @ cdecl _wtol_l(wstr ptr) MSVCRT__wtol_l diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c index 1cf227651ce..4b23671320f 100644 --- a/dlls/msvcrt/wcs.c +++ b/dlls/msvcrt/wcs.c @@ -1888,3 +1888,38 @@ MSVCRT_wchar_t* CDECL MSVCRT_wcsstr(const MSVCRT_wchar_t *str, const MSVCRT_wcha { return strstrW(str, sub); } + +/********************************************************************* + * _wtoi64_l (MSVCRT.@) + */ +__int64 CDECL _wtoi64_l(const MSVCRT_wchar_t *str, MSVCRT__locale_t locale) +{ + ULONGLONG RunningTotal = 0; + char bMinus = 0; + + while (isspaceW(*str)) { + str++; + } /* while */ + + if (*str == '+') { + str++; + } else if (*str == '-') { + bMinus = 1; + str++; + } /* if */ + + while (*str >= '0' && *str <= '9') { + RunningTotal = RunningTotal * 10 + *str - '0'; + str++; + } /* while */ + + return bMinus ? -RunningTotal : RunningTotal; +} + +/********************************************************************* + * _wtoi64 (MSVCRT.@) + */ +__int64 CDECL _wtoi64(const MSVCRT_wchar_t *str) +{ + return _wtoi64_l(str, NULL); +}