Piotr Caban : msvcp90: Added _Stollx implementation.
Alexandre Julliard
julliard at winehq.org
Wed Jun 20 13:49:44 CDT 2012
Module: wine
Branch: master
Commit: d1b67cea3b56cf32c8130ca020d53a8f18876e68
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d1b67cea3b56cf32c8130ca020d53a8f18876e68
Author: Piotr Caban <piotr at codeweavers.com>
Date: Wed Jun 20 13:15:11 2012 +0200
msvcp90: Added _Stollx implementation.
---
dlls/msvcp90/locale.c | 29 +++++++++++++++++++++++++++++
dlls/msvcp90/msvcp90.spec | 6 +++---
2 files changed, 32 insertions(+), 3 deletions(-)
diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c
index fc682a1..ac44e1a 100644
--- a/dlls/msvcp90/locale.c
+++ b/dlls/msvcp90/locale.c
@@ -3907,6 +3907,35 @@ float __cdecl _Stofx(const char *buf, char **buf_end, LONG exp, int *err)
return _Stodx(buf, buf_end, exp, err);
}
+__int64 __cdecl _Stoll(const char *buf, char **buf_end, int base)
+{
+ return _strtoi64(buf, buf_end, base);
+}
+
+__int64 __cdecl _Stollx(const char *buf, char **buf_end, int base, int *err)
+{
+ __int64 ret;
+
+ *err = *_errno();
+ *_errno() = 0;
+ ret = _strtoi64(buf, buf_end, base);
+ if(*_errno()) {
+ *err = *_errno();
+ }else {
+ *_errno() = *err;
+ *err = 0;
+ }
+ return ret;
+}
+
+LONG __cdecl _Stolx(const char *buf, char **buf_end, int base, int *err)
+{
+ __int64 i = _Stollx(buf, buf_end, base, err);
+ if(!*err && i!=(__int64)((LONG)i))
+ *err = ERANGE;
+ return i;
+}
+
/* ?id@?$num_get at _WV?$istreambuf_iterator at _WU?$char_traits at _W@std@@@std@@@std@@2V0locale at 2@A */
locale_id num_get_wchar_id = {0};
/* ?id@?$num_get at GV?$istreambuf_iterator at GU?$char_traits at G@std@@@std@@@std@@2V0locale at 2@A */
diff --git a/dlls/msvcp90/msvcp90.spec b/dlls/msvcp90/msvcp90.spec
index 827f7a7..d8bf44f 100644
--- a/dlls/msvcp90/msvcp90.spec
+++ b/dlls/msvcp90/msvcp90.spec
@@ -5789,9 +5789,9 @@
@ cdecl _Stofx(ptr ptr long ptr)
@ cdecl _Stold(ptr ptr long) _Stod
@ cdecl _Stoldx(ptr ptr long ptr) _Stodx
-@ stub _Stoll
-@ stub _Stollx
-@ stub _Stolx
+@ cdecl -ret64 _Stoll(ptr ptr long)
+@ cdecl -ret64 _Stollx(ptr ptr long ptr)
+@ cdecl _Stolx(ptr ptr long ptr)
@ stub _Stoul
@ stub _Stoull
@ stub _Stoullx
More information about the wine-cvs
mailing list