GNU bug report logs - #20819
[PATCH] i18n: check for non-POSIX strtol_l

Previous Next

Package: guile;

Reported by: Natanael Copa <ncopa <at> alpinelinux.org>

Date: Mon, 15 Jun 2015 15:28:02 UTC

Severity: normal

Tags: patch

Done: Mark H Weaver <mhw <at> netris.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 20819 in the body.
You can then email your comments to 20819 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#20819; Package guile. (Mon, 15 Jun 2015 15:28:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Natanael Copa <ncopa <at> alpinelinux.org>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Mon, 15 Jun 2015 15:28:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Natanael Copa <ncopa <at> alpinelinux.org>
To: bug-guile <at> gnu.org
Cc: Natanael Copa <ncopa <at> alpinelinux.org>
Subject: [PATCH] i18n: check for non-POSIX strtol_l
Date: Mon, 15 Jun 2015 10:05:41 +0200
* configure.ac: Check for strtol_l
* libguile/i18n.c: Check with HAVE_STRTOL_L before using strtol_l. This
  fixes build with musl libc.
---
 configure.ac    | 5 +++--
 libguile/i18n.c | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 19e00d8..b73a0db 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 and BSD
 #   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,
-- 
2.4.3





Reply sent to Mark H Weaver <mhw <at> netris.org>:
You have taken responsibility. (Fri, 19 Jun 2015 20:10:03 GMT) Full text and rfc822 format available.

Notification sent to Natanael Copa <ncopa <at> alpinelinux.org>:
bug acknowledged by developer. (Fri, 19 Jun 2015 20:10:04 GMT) Full text and rfc822 format available.

Message #10 received at 20819-done <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: Natanael Copa <ncopa <at> alpinelinux.org>
Cc: 20819-done <at> debbugs.gnu.org
Subject: Re: bug#20819: [PATCH] i18n: check for non-POSIX strtol_l
Date: Fri, 19 Jun 2015 16:09:06 -0400
Natanael Copa <ncopa <at> alpinelinux.org> writes:

> * configure.ac: Check for strtol_l
> * libguile/i18n.c: Check with HAVE_STRTOL_L before using strtol_l. This
>   fixes build with musl libc.

Pushed (with slight modifications) to stable-2.0.

    Thanks!
      Mark




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 18 Jul 2015 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 334 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.