Use strtod instead of strtold in libiberty/d-demangle.c
authorJoel Brobecker <brobecker@adacore.com>
Tue, 14 Oct 2014 16:47:43 +0000 (12:47 -0400)
committerJoel Brobecker <brobecker@adacore.com>
Thu, 16 Oct 2014 21:52:17 +0000 (14:52 -0700)
commit5af04e20f6333dc224d1668dcd433d7c8ca84e71
treec83b685982139aa3241972ddb308b7b925b42372
parent89c7137fad41711072e2a15ce539e2ad293bd065
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.
libiberty/ChangeLog
libiberty/d-demangle.c
This page took 0.024618 seconds and 4 git commands to generate.