[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 09/11: Check for strtod_l before using it.
From: |
Andy Wingo |
Subject: |
[Guile-commits] 09/11: Check for strtod_l before using it. |
Date: |
Sun, 26 Jun 2016 20:58:18 +0000 (UTC) |
wingo pushed a commit to branch stable-2.0
in repository guile.
commit 96f55b7f36515b3896a773efb33b305b83a0769f
Author: Andy Wingo <address@hidden>
Date: Fri Jun 24 17:52:30 2016 +0200
Check for strtod_l before using it.
Based on a patch by Andy Stormont <address@hidden>.
* 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.
---
configure.ac | 2 +-
libguile/i18n.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index 184f0b7..fff4f80 100644
--- a/configure.ac
+++ b/configure.ac
@@ -766,7 +766,7 @@ AC_CHECK_FUNCS([DINFINITY DQNAN cexp chsize clog clog10
ctermid \
strdup system usleep atexit on_exit chown link fcntl ttyname getpwent
\
getgrent kill getppid getpgrp fork setitimer getitimer strchr strcmp \
index bcopy memcpy rindex truncate unsetenv isblank _NSGetEnviron \
- strcoll strcoll_l strtol_l newlocale uselocale utimensat \
+ strcoll strcoll_l strtod_l strtol_l newlocale uselocale utimensat \
sched_getaffinity sched_setaffinity sendfile])
# Reasons for testing:
diff --git a/libguile/i18n.c b/libguile/i18n.c
index 84c6bfc..6f75966 100644
--- a/libguile/i18n.c
+++ b/libguile/i18n.c
@@ -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,
- [Guile-commits] branch stable-2.0 updated (ea352d9 -> 8110246), Andy Wingo, 2016/06/26
- [Guile-commits] 01/11: Fix R6RS fold-left documentation, Andy Wingo, 2016/06/26
- [Guile-commits] 04/11: Fix typo about `keywords' read option, Andy Wingo, 2016/06/26
- [Guile-commits] 08/11: Constant-folding eq? and eqv? uses deduplication, Andy Wingo, 2016/06/26
- [Guile-commits] 02/11: Clarify use of the term "scanning" in the manual, Andy Wingo, 2016/06/26
- [Guile-commits] 09/11: Check for strtod_l before using it.,
Andy Wingo <=
- [Guile-commits] 10/11: Favor "escape continuation" over "one-shot continuation" in manual, Andy Wingo, 2016/06/26
- [Guile-commits] 07/11: Prevent (@ (ice-9 boot-9) x), Andy Wingo, 2016/06/26
- [Guile-commits] 03/11: Fix ,profile in pure modules, Andy Wingo, 2016/06/26
- [Guile-commits] 06/11: Fix texinfo->html for @acronym, @itemize, Andy Wingo, 2016/06/26
- [Guile-commits] 05/11: Avoid stifling readline history when looking up options, Andy Wingo, 2016/06/26
- [Guile-commits] 11/11: Add documentation pointer from getopt-long to SRFI-37., Andy Wingo, 2016/06/26