MinGW: Use __mingw_strtold instead of strtold.

The latter fails to parse hex floating point literals.
This commit is contained in:
David Nadlinger
2013-02-20 23:45:11 +01:00
parent 2d3de4a3d4
commit 6dc122b424
4 changed files with 22 additions and 0 deletions

View File

@@ -670,3 +670,18 @@ char *Port::strupr(char *s)
}
#endif
#if IN_LLVM
#if __MINGW32__
longdouble Port::strtold(const char *str, char **pend)
{
return __mingw_strtold(str, pend);
}
#else
longdouble Port::strtold(const char *str, char **pend)
{
return ::strtold(str, pend);
}
#endif
#endif

View File

@@ -61,6 +61,9 @@ struct Port
static longdouble fmodl(longdouble x, longdouble y);
static ulonglong strtoull(const char *p, char **pend, int base);
#if IN_LLVM
static longdouble strtold(const char *str, char **pend);
#endif
static char *ull_to_string(char *buffer, ulonglong ull);
static wchar_t *ull_to_string(wchar_t *buffer, ulonglong ull);