From unknown Sun Jun 15 08:48:09 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20819: [PATCH] i18n: check for non-POSIX strtol_l Resent-From: Natanael Copa Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 15 Jun 2015 15:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 20819 X-GNU-PR-Package: guile X-GNU-PR-Keywords: patch To: 20819@debbugs.gnu.org Cc: Natanael Copa X-Debbugs-Original-To: bug-guile@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.143438205229562 (code B ref -1); Mon, 15 Jun 2015 15:28:02 +0000 Received: (at submit) by debbugs.gnu.org; 15 Jun 2015 15:27:32 +0000 Received: from localhost ([127.0.0.1]:54851 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z4WIM-0007gh-Nd for submit@debbugs.gnu.org; Mon, 15 Jun 2015 11:27:31 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54475) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z4Q0P-00057O-Bc for submit@debbugs.gnu.org; Mon, 15 Jun 2015 04:44:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4Q0J-0006wo-8K for submit@debbugs.gnu.org; Mon, 15 Jun 2015 04:44:28 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:52853) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4Q0J-0006wk-53 for submit@debbugs.gnu.org; Mon, 15 Jun 2015 04:44:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39736) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4Q0H-0002er-Sc for bug-guile@gnu.org; Mon, 15 Jun 2015 04:44:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4Q0D-0006t8-Rz for bug-guile@gnu.org; Mon, 15 Jun 2015 04:44:25 -0400 Received: from [79.160.13.133] (port=58386 helo=tanael.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4Q0D-0006rp-KW for bug-guile@gnu.org; Mon, 15 Jun 2015 04:44:21 -0400 Received: by tanael.org (Postfix, from userid 1001) id 05C42F6E23; Mon, 15 Jun 2015 10:05:49 +0200 (CEST) From: Natanael Copa Date: Mon, 15 Jun 2015 10:05:41 +0200 Message-Id: <1434355541-11017-1-git-send-email-ncopa@alpinelinux.org> X-Mailer: git-send-email 2.4.3 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Mailman-Approved-At: Mon, 15 Jun 2015 11:27:29 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) * 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 From unknown Sun Jun 15 08:48:09 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Natanael Copa Subject: bug#20819: closed (Re: bug#20819: [PATCH] i18n: check for non-POSIX strtol_l) Message-ID: References: <87pp4rbgv1.fsf@netris.org> <1434355541-11017-1-git-send-email-ncopa@alpinelinux.org> X-Gnu-PR-Message: they-closed 20819 X-Gnu-PR-Package: guile X-Gnu-PR-Keywords: patch Reply-To: 20819@debbugs.gnu.org Date: Fri, 19 Jun 2015 20:10:04 +0000 Content-Type: multipart/mixed; boundary="----------=_1434744604-2748-1" This is a multi-part message in MIME format... ------------=_1434744604-2748-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #20819: [PATCH] i18n: check for non-POSIX strtol_l which was filed against the guile package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 20819@debbugs.gnu.org. --=20 20819: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D20819 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1434744604-2748-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 20819-done) by debbugs.gnu.org; 19 Jun 2015 20:09:15 +0000 Received: from localhost ([127.0.0.1]:52263 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z62bC-0000hJ-W7 for submit@debbugs.gnu.org; Fri, 19 Jun 2015 16:09:15 -0400 Received: from world.peace.net ([50.252.239.5]:34246 ident=hope6) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z62bA-0000h9-VT for 20819-done@debbugs.gnu.org; Fri, 19 Jun 2015 16:09:13 -0400 Received: from [10.1.10.104] (helo=jojen) by world.peace.net with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Z62b5-0007W3-9N; Fri, 19 Jun 2015 16:09:07 -0400 From: Mark H Weaver To: Natanael Copa Subject: Re: bug#20819: [PATCH] i18n: check for non-POSIX strtol_l References: <1434355541-11017-1-git-send-email-ncopa@alpinelinux.org> Date: Fri, 19 Jun 2015 16:09:06 -0400 In-Reply-To: <1434355541-11017-1-git-send-email-ncopa@alpinelinux.org> (Natanael Copa's message of "Mon, 15 Jun 2015 10:05:41 +0200") Message-ID: <87pp4rbgv1.fsf@netris.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 20819-done Cc: 20819-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Natanael Copa 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 ------------=_1434744604-2748-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 15 Jun 2015 15:27:32 +0000 Received: from localhost ([127.0.0.1]:54851 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z4WIM-0007gh-Nd for submit@debbugs.gnu.org; Mon, 15 Jun 2015 11:27:31 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54475) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z4Q0P-00057O-Bc for submit@debbugs.gnu.org; Mon, 15 Jun 2015 04:44:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4Q0J-0006wo-8K for submit@debbugs.gnu.org; Mon, 15 Jun 2015 04:44:28 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:52853) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4Q0J-0006wk-53 for submit@debbugs.gnu.org; Mon, 15 Jun 2015 04:44:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39736) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4Q0H-0002er-Sc for bug-guile@gnu.org; Mon, 15 Jun 2015 04:44:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4Q0D-0006t8-Rz for bug-guile@gnu.org; Mon, 15 Jun 2015 04:44:25 -0400 Received: from [79.160.13.133] (port=58386 helo=tanael.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4Q0D-0006rp-KW for bug-guile@gnu.org; Mon, 15 Jun 2015 04:44:21 -0400 Received: by tanael.org (Postfix, from userid 1001) id 05C42F6E23; Mon, 15 Jun 2015 10:05:49 +0200 (CEST) From: Natanael Copa To: bug-guile@gnu.org Subject: [PATCH] i18n: check for non-POSIX strtol_l Date: Mon, 15 Jun 2015 10:05:41 +0200 Message-Id: <1434355541-11017-1-git-send-email-ncopa@alpinelinux.org> X-Mailer: git-send-email 2.4.3 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 15 Jun 2015 11:27:29 -0400 Cc: Natanael Copa X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) * 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 ------------=_1434744604-2748-1--