mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-07-29 10:30:04 +02:00
MinGW: Use __mingw_strtold instead of strtold.
The latter fails to parse hex floating point literals.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user