diff --git a/dlls/msvcp90/locale.c b/dlls/msvcp90/locale.c index e41580770fc..1330d17e778 100644 --- a/dlls/msvcp90/locale.c +++ b/dlls/msvcp90/locale.c @@ -24,6 +24,7 @@ #include "locale.h" #include "errno.h" #include "limits.h" +#include "math.h" #include "wine/list.h" @@ -3871,6 +3872,31 @@ basic_string_wchar* __thiscall numpunct_wchar_truename(const numpunct_wchar *thi return call_numpunct_wchar_do_truename(this, ret); } +double __cdecl _Stod(const char *buf, char **buf_end, LONG exp) +{ + double ret = strtod(buf, buf_end); + + if(exp) + ret *= pow(10, exp); + return ret; +} + +double __cdecl _Stodx(const char *buf, char **buf_end, LONG exp, int *err) +{ + double ret; + + *err = *_errno(); + *_errno() = 0; + ret = _Stod(buf, buf_end, exp); + if(*_errno()) { + *err = *_errno(); + }else { + *_errno() = *err; + *err = 0; + } + return ret; +} + /* ?id@?$num_get@_WV?$istreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@2V0locale@2@A */ locale_id num_get_wchar_id = {0}; /* ?id@?$num_get@GV?$istreambuf_iterator@GU?$char_traits@G@std@@@std@@@std@@2V0locale@2@A */ diff --git a/dlls/msvcp90/msvcp90.spec b/dlls/msvcp90/msvcp90.spec index a5976e184d9..3d155183991 100644 --- a/dlls/msvcp90/msvcp90.spec +++ b/dlls/msvcp90/msvcp90.spec @@ -5783,12 +5783,12 @@ # extern _Rteps @ stub _Sinh @ extern _Snan -@ stub _Stod -@ stub _Stodx +@ cdecl _Stod(ptr ptr long) +@ cdecl _Stodx(ptr ptr long ptr) @ stub _Stof @ stub _Stofx -@ stub _Stold -@ stub _Stoldx +@ cdecl _Stold(ptr ptr long) _Stod +@ cdecl _Stoldx(ptr ptr long ptr) _Stodx @ stub _Stoll @ stub _Stollx @ stub _Stolx