diff options
Diffstat (limited to 'libiberty/d-demangle.c')
-rw-r--r-- | libiberty/d-demangle.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libiberty/d-demangle.c b/libiberty/d-demangle.c index d31bf94..bb481c0 100644 --- a/libiberty/d-demangle.c +++ b/libiberty/d-demangle.c @@ -28,7 +28,7 @@ If not, see <http://www.gnu.org/licenses/>. */ /* This file exports one function; dlang_demangle. - This file imports strtol and strtold for decoding mangled literals. */ + This file imports strtol and strtod for decoding mangled literals. */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -44,7 +44,7 @@ If not, see <http://www.gnu.org/licenses/>. */ #include <stdlib.h> #else extern long strtol (const char *nptr, char **endptr, int base); -extern long double strtold (const char *nptr, char **endptr); +extern double strtod (const char *nptr, char **endptr); #endif #include <demangle.h> @@ -810,7 +810,7 @@ dlang_parse_real (string *decl, const char *mangled) { char buffer[64]; int len = 0; - long double value; + double value; char *endptr; /* Handle NAN and +-INF. */ @@ -877,12 +877,12 @@ dlang_parse_real (string *decl, const char *mangled) /* Convert buffer from hexadecimal to floating-point. */ buffer[len] = '\0'; - value = strtold (buffer, &endptr); + value = strtod (buffer, &endptr); if (endptr == NULL || endptr != (buffer + len)) return NULL; - len = snprintf (buffer, sizeof(buffer), "%#Lg", value); + len = snprintf (buffer, sizeof(buffer), "%#g", value); string_appendn (decl, buffer, len); return mangled; } |