1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-18 01:30:27 +02:00

Check for strtod_l before using it.

Based on a patch by Andy Stormont <astormont@racktopsystems.com>.

* configure.ac: Check for strtod_l.
* libguile/i18n.c (scm_locale_string_to_integer): Fix style.
  (scm_locale_string_to_inexact): Check for strtod_l.
This commit is contained in:
Andy Wingo 2016-06-24 17:52:30 +02:00
parent 45b80a1fa8
commit 96f55b7f36
2 changed files with 3 additions and 3 deletions

View file

@ -1335,7 +1335,7 @@ SCM_DEFINE (scm_locale_string_to_integer, "locale-string->integer",
if (c_locale != NULL)
{
#if defined(USE_GNU_LOCALE_API) && defined(HAVE_STRTOL_L)
#if defined USE_GNU_LOCALE_API && defined HAVE_STRTOL_L
c_result = strtol_l (c_str, &c_endptr, c_base, c_locale);
#else
RUN_IN_LOCALE_SECTION (c_locale,
@ -1379,7 +1379,7 @@ SCM_DEFINE (scm_locale_string_to_inexact, "locale-string->inexact",
if (c_locale != NULL)
{
#ifdef USE_GNU_LOCALE_API
#if defined USE_GNU_LOCALE_API && defined HAVE_STRTOD_L
c_result = strtod_l (c_str, &c_endptr, c_locale);
#else
RUN_IN_LOCALE_SECTION (c_locale,