[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 15/47: i18n: Check for non-POSIX strtol_l.
From: |
Andy Wingo |
Subject: |
[Guile-commits] 15/47: i18n: Check for non-POSIX strtol_l. |
Date: |
Sun, 22 May 2016 18:23:04 +0000 (UTC) |
wingo pushed a commit to branch master
in repository guile.
commit 7413430fd742bbe867f5f1358e729514b5a08973
Author: Natanael Copa <address@hidden>
Date: Mon Jun 15 10:05:41 2015 +0200
i18n: Check for non-POSIX strtol_l.
* configure.ac: Check for strtol_l.
* libguile/i18n.c: Check HAVE_STRTOL_L before using strtol_l.
---
configure.ac | 5 +++--
libguile/i18n.c | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index 0eb2368..3a8f772 100644
--- a/configure.ac
+++ b/configure.ac
@@ -752,6 +752,7 @@ AC_CHECK_HEADERS([assert.h crt_externs.h])
# isblank - available as a GNU extension or in C99
# _NSGetEnviron - Darwin specific
# strcoll_l, newlocale, uselocale, utimensat - POSIX.1-2008
+# strtol_l - non-POSIX, found in glibc
# fork - unavailable on Windows
# sched_getaffinity, sched_setaffinity - GNU extensions (glibc)
# sendfile - non-POSIX, found in glibc
@@ -765,8 +766,8 @@ 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 newlocale uselocale utimensat sched_getaffinity \
- sched_setaffinity sendfile])
+ strcoll strcoll_l strtol_l newlocale uselocale utimensat \
+ sched_getaffinity sched_setaffinity sendfile])
# Reasons for testing:
# netdb.h - not in mingw
diff --git a/libguile/i18n.c b/libguile/i18n.c
index f0e3443..17e9eca 100644
--- a/libguile/i18n.c
+++ b/libguile/i18n.c
@@ -1373,7 +1373,7 @@ SCM_DEFINE (scm_locale_string_to_integer,
"locale-string->integer",
if (c_locale != NULL)
{
-#ifdef USE_GNU_LOCALE_API
+#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,
- [Guile-commits] 44/47: Bump user-visible copyright years to 2016., (continued)
- [Guile-commits] 44/47: Bump user-visible copyright years to 2016., Andy Wingo, 2016/05/22
- [Guile-commits] 03/47: Implement 'string-utf8-length' and 'scm_c_string_utf8_length'., Andy Wingo, 2016/05/22
- [Guile-commits] 12/47: doc: Update libgc URL., Andy Wingo, 2016/05/22
- [Guile-commits] 09/47: Work around requirement that size be non-zero in GDB 'open-memory'., Andy Wingo, 2016/05/22
- [Guile-commits] 07/47: Correct docstring of 'symlink'., Andy Wingo, 2016/05/22
- [Guile-commits] 11/47: Add more R6RS port encoding tests, Andy Wingo, 2016/05/22
- [Guile-commits] 01/47: tests: Use 'pass-if-equal' in web-http chunked encoding tests., Andy Wingo, 2016/05/22
- [Guile-commits] 13/47: Fix typo in manual., Andy Wingo, 2016/05/22
- [Guile-commits] 19/47: Fix uses of 'scm_gc_protect', which does not exist, in the manual., Andy Wingo, 2016/05/22
- [Guile-commits] 21/47: psyntax: Fix bug in match-each+., Andy Wingo, 2016/05/22
- [Guile-commits] 15/47: i18n: Check for non-POSIX strtol_l.,
Andy Wingo <=
- [Guile-commits] 28/47: i18n: Add new collation test for posterity., Andy Wingo, 2016/05/22
- [Guile-commits] 05/47: tests: Make 'test-guild-compile' more reliable., Andy Wingo, 2016/05/22
- [Guile-commits] 32/47: Remove SIGEV constant definitions., Andy Wingo, 2016/05/22
- [Guile-commits] 04/47: Don't return expressions from void functions in numbers.c, Andy Wingo, 2016/05/22
- [Guile-commits] 31/47: Add Hurd signal and error constants., Andy Wingo, 2016/05/22
- [Guile-commits] 08/47: web: Export 'server-impl' procedures and the 'http' server implementation., Andy Wingo, 2016/05/22
- [Guile-commits] 39/47: Bump user-visible copyright years to 2015., Andy Wingo, 2016/05/22
- [Guile-commits] 43/47: SRFI-19: Update the table of leap seconds., Andy Wingo, 2016/05/22
- [Guile-commits] 41/47: http: Accept empty reason phrases., Andy Wingo, 2016/05/22
- [Guile-commits] 42/47: http: Use 'read-header-line' instead of 'read-line*'., Andy Wingo, 2016/05/22