From 4f40ffb9c5f16cf18ae388d71624252443fee349 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 21 May 2020 01:46:03 +0200 Subject: [PATCH] stdlib.h: Provide strtold as an inline wrapper. This allows using long double in the declaration, which fixes -Wincompatible-library-redeclaration. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- include/msvcrt/stdlib.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/msvcrt/stdlib.h b/include/msvcrt/stdlib.h index 22626d7e14f..f14256c18f6 100644 --- a/include/msvcrt/stdlib.h +++ b/include/msvcrt/stdlib.h @@ -211,7 +211,6 @@ void* __cdecl realloc(void*,size_t); void __cdecl srand(unsigned int); float __cdecl strtof(const char*,char**); double __cdecl strtod(const char*,char**); -double __cdecl strtold(const char*,char**); __msvcrt_long __cdecl strtol(const char*,char**,int); __msvcrt_ulong __cdecl strtoul(const char*,char**,int); __int64 __cdecl strtoll_l(const char*,char**,int,_locale_t); @@ -232,6 +231,11 @@ _ACRTIMP _invalid_parameter_handler __cdecl _set_thread_local_invalid_parameter_ void __cdecl _invalid_parameter(const wchar_t *expr, const wchar_t *func, const wchar_t *file, unsigned int line, uintptr_t arg); +#ifdef _UCRT +_ACRTIMP double __cdecl _strtold_l(const char*,char**,_locale_t); +static inline long double strtold(const char *string, char **endptr) { return _strtold_l(string, endptr, NULL); } +#endif /* _UCRT */ + #ifdef __cplusplus } #endif