Use strtod instead of strtold in libiberty/d-demangle.c
commitc9e82714cf9fc5ef667fd67ab9154be24b09f2f9
authorbrobecke <brobecke@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 14 Oct 2014 17:57:08 +0000 (14 17:57 +0000)
committerbrobecke <brobecke@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 14 Oct 2014 17:57:08 +0000 (14 17:57 +0000)
treefa07e611157bd534c668860de85bd30c4a8b2096
parent7e2c76d3ca51ebc5c61db242e8838e7e359c69f3
Use strtod instead of strtold in libiberty/d-demangle.c

strtold is currently used to decode templates which have a floating-point
value encoded inside; but this routine is not available on some systems,
such as Solaris 2.9 for instance.

This patch fixes the issue by replace the use of strtold by strtod.
It reduces a bit the precision, but it should still remain acceptable
in most cases.

libiberty/ChangeLog:

        * d-demangle.c: Replace strtold with strtod in global comment.
        (strtold): Remove declaration.
        (strtod): New declaration.
        (dlang_parse_real): Declare value as double instead of long
        double.  Replace call to strtold by call to strtod.
        Update format in call to snprintf.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216216 138bc75d-0d04-0410-961f-82ee72b054a4
libiberty/ChangeLog
libiberty/d-demangle.c