Module: wine Branch: master Commit: 6c04a187d24a396b0a141ddf96959f6c7c834c6e URL: http://source.winehq.org/git/wine.git/?a=commit;h=6c04a187d24a396b0a141ddf96...
Author: Louis Lenders xerox_xerox2000@yahoo.co.uk Date: Sun Dec 17 17:56:50 2006 +0000
msvcrt: Add _atoldbl.
---
configure | 2 ++ configure.ac | 1 + dlls/msvcrt/msvcrt.h | 2 ++ dlls/msvcrt/msvcrt.spec | 2 +- dlls/msvcrt/string.c | 18 ++++++++++++++++++ include/config.h.in | 3 +++ 6 files changed, 27 insertions(+), 1 deletions(-)
diff --git a/configure b/configure index b60889d..6779121 100755 --- a/configure +++ b/configure @@ -15845,6 +15845,7 @@ fi
+ for ac_func in \ _pclose \ _popen \ @@ -15910,6 +15911,7 @@ for ac_func in \ strcasecmp \ strerror \ strncasecmp \ + strtold \ tcgetattr \ timegm \ usleep \ diff --git a/configure.ac b/configure.ac index f44e3eb..efbf32d 100644 --- a/configure.ac +++ b/configure.ac @@ -1228,6 +1228,7 @@ AC_CHECK_FUNCS(\ strcasecmp \ strerror \ strncasecmp \ + strtold \ tcgetattr \ timegm \ usleep \ diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index 0066e3d..3a50af2 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -70,6 +70,8 @@ typedef void (*MSVCRT__beginthread_start typedef unsigned int (__stdcall *MSVCRT__beginthreadex_start_routine_t)(void *); typedef int (*MSVCRT__onexit_t)(void);
+typedef struct {long double x;} _LDOUBLE; + struct MSVCRT_tm { int tm_sec; int tm_min; diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 59e21f6..7712045 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -166,7 +166,7 @@ @ cdecl _assert(str str long) MSVCRT__assert @ stub _atodbl #(ptr str) @ cdecl -ret64 _atoi64(str) ntdll._atoi64 -@ stub _atoldbl #(ptr str) +@ cdecl _atoldbl(ptr str) MSVCRT__atoldbl @ cdecl _beep(long long) @ cdecl _beginthread (ptr long ptr) @ cdecl _beginthreadex (ptr long ptr ptr long ptr) diff --git a/dlls/msvcrt/string.c b/dlls/msvcrt/string.c index 6dfce9a..ec4bd70 100644 --- a/dlls/msvcrt/string.c +++ b/dlls/msvcrt/string.c @@ -21,6 +21,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */
+#define _ISOC99_SOURCE +#include "config.h" + #include <stdlib.h> #include "msvcrt.h" #include "wine/debug.h" @@ -184,3 +187,18 @@ int CDECL MSVCRT__stricoll( const char* TRACE("str1 %s str2 %s\n", debugstr_a(str1), debugstr_a(str2)); return lstrcmpiA( str1, str2 ); } + +/******************************************************************** + * _atoldbl (MSVCRT.@) + */ +int CDECL MSVCRT__atoldbl(_LDOUBLE * value, char * str) +{ + /* FIXME needs error checking for huge/small values */ +#ifdef HAVE_STRTOLD + TRACE("str %s value %p\n",str,value); + value->x = strtold(str,0); +#else + FIXME("stub, str %s value %p\n",str,value); +#endif + return 0; +} diff --git a/include/config.h.in b/include/config.h.in index 11bd3bb..6f5387a 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -666,6 +666,9 @@ /* Define to 1 if you have the `strncasecmp' function. */ #undef HAVE_STRNCASECMP
+/* Define to 1 if you have the `strtold' function. */ +#undef HAVE_STRTOLD + /* Define to 1 if `direction' is member of `struct ff_effect'. */ #undef HAVE_STRUCT_FF_EFFECT_DIRECTION