unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Andy Stormont <astormont@racktopsystems.com>
To: 21872@debbugs.gnu.org
Subject: bug#21872: [PATCH] guile fails to build on illumos
Date: Tue, 10 Nov 2015 16:16:39 +0000	[thread overview]
Message-ID: <8DDFFA1D-5FA8-4F1C-9C19-345CE17CC69C@racktopsystems.com> (raw)

The patch below allows Guile to build on illumos, which does not have full support for the GNU locale extensions.  For more information on what’s missing see here: https://www.illumos.org/issues/5346

diff --git a/configure.ac b/configure.ac
index 9e639d6..408643b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -765,8 +765,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 strtod_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..bd0b5a2 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,
@@ -1417,7 +1417,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,

- Andy.

             reply	other threads:[~2015-11-10 16:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-10 16:16 Andy Stormont [this message]
2016-06-24 15:54 ` bug#21872: [PATCH] guile fails to build on illumos Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8DDFFA1D-5FA8-4F1C-9C19-345CE17CC69C@racktopsystems.com \
    --to=astormont@racktopsystems.com \
    --cc=21872@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).