]> Savannah Git Hosting - gnulib.git/commit
c-strtod, c-strtold: Make multithread-safe.
authorBruno Haible <bruno@clisp.org>
Tue, 5 Mar 2024 16:10:38 +0000 (17:10 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 16 Mar 2024 10:44:22 +0000 (11:44 +0100)
commit2340b31a5becc9dae937244b3be01790389b7dae
tree4cb9bc657f2467291808925d1eaf277dd1bc435c
parentcfe4717d86b18aaa7417e31f6de3776e067b7341
c-strtod, c-strtold: Make multithread-safe.

* lib/c-strtod.c: Include <langinfo.h>, c-ctype.h.
(decimal_point_char): New function, copied from lib/vasnprintf.c.
(C_STRTOD): On platforms that don't have STRTOD_L nor a working
uselocale(), pre-parse the number and call STRTOD after having replaced
the '.' with the locale-dependent decimal point character.
* m4/c-strtod.m4 (gl_C_STRTOD, gl_C_STRTOLD): Test for nl_langinfo().
* modules/c-strtod (Depends-on): Add c-ctype. Remove strdup-posix.
* modules/c-strtold (Depends-on): Likewise.
ChangeLog
lib/c-strtod.c
m4/c-strtod.m4
modules/c-strtod
modules/c-strtold