diff options
author | Bruno Haible <bruno@clisp.org> | 2019-02-01 03:12:28 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2019-02-01 03:12:28 +0100 |
commit | 97e23d40a659c85048b59852e1871823f727aeb2 (patch) | |
tree | 3af9ca8e63074de5b0b42826f24d18a4c5932dc5 /modules/c-strtold | |
parent | cd825c6d50babc1f4fbaccfee3fff1785fe23cc3 (diff) | |
download | gnulib-97e23d40a659c85048b59852e1871823f727aeb2.tar.gz |
strtod, strtold: Use the locale's decimal point.
* lib/strtod.c: Include <locale.h>, <stdio.h>, <langinfo.h>.
(decimal_point_char): New function, copied from lib/vasnprintf.c.
(parse_number): Add a radixchar argument. Use it instead of '.'.
(STRTOD): Invoke decimal_point_char and pass the result to parse_number.
* m4/strtod.m4 (gl_PREREQ_STRTOD): Test whether nl_langinfo exists.
* m4/strtold.m4 (gl_PREREQ_STRTOLD): Likewise.
* tests/test-strtod1.c: New file.
* tests/test-strtod1.sh: New file.
* modules/strtod-tests (Files): Add test-strtod1.{sh,c}. Add
locale-fr.m4 and its dependencies.
(configure.ac): Invoke gt_LOCALE_FR, gt_LOCALE_FR_UTF8.
(Makefile.am): Arrange to compile test-strtod1.c and run
test-strtod1.sh.
* tests/test-strtold1.c: New file.
* tests/test-strtold1.sh: New file.
* modules/strtold-tests (Files): Add test-strtold1.{sh,c}. Add
locale-fr.m4 and its dependencies.
(configure.ac): Invoke gt_LOCALE_FR, gt_LOCALE_FR_UTF8.
(Makefile.am): Arrange to compile test-strtold1.c and run
test-strtold1.sh.
Diffstat (limited to 'modules/c-strtold')
0 files changed, 0 insertions, 0 deletions