]> sourceware.org Git - newlib-cygwin.git/commit
stdlib: conditionalize locale usage
authorCorinna Vinschen <corinna@vinschen.de>
Mon, 23 Aug 2021 07:56:22 +0000 (09:56 +0200)
committerCorinna Vinschen <corinna@vinschen.de>
Mon, 23 Aug 2021 08:02:00 +0000 (10:02 +0200)
commitbc0e8a996110550f65cd356d7da0ba1b5beb243e
tree09c4d6e2205c50eb4546aafbb0ed65e0c32e3c46
parent5036d447c54c41968ccd19a6294f69e4085d0143
stdlib: conditionalize locale usage

_strtod_l as well as the gethex function both fetch the decimal point
from the current LC_NUMERIC locale info.  This pulls in _C_numeric_locale
unconditionally even on targets not supporting locales at all.

Another problem is that strtod.c and gdtoa-gethex.c are ELIX 1, while
locale information in general isn't.  This leads to potential build
breakage on bare metal targets.

Fix this by setting the decimal point to "." on all targets not
defining __HAVE_LOCALE_INFO__.

While at it, const'ify the entire local decimal point info in the
affected functions.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
newlib/libc/stdlib/gdtoa-gethex.c
newlib/libc/stdlib/strtod.c
This page took 0.030315 seconds and 5 git commands to generate.