Subject: bug#18898: closed (Re: bug#18898: Two portability patches)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 12 Nov 2014 06:01:02 +0000

Your bug report

#18898: Two portability patches

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 [email-masked].

-- 
18898: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18898
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#18898: Two portability patches
From: Mark H Weaver <[email-masked]>
To: Thomas Klausner <[email-masked]>
Cc: [email-masked]
Date: Wed, 12 Nov 2014 00:59:10 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

Thomas Klausner <[email-masked]> writes:

> test does not generally support '==' as comparison operator.
>     
> It's a bash(1) feature; not even GNU coreutils test(1) supports it.
> Use '=' instead.

Fixed in 03242f398f3520b1b27caf5885c8d5600094f944.

> NetBSD provides newlocale and strcoll_l, but not uselocale.

Fixed in 30c5982a9548a0ca0ea46111beb490f06d74a40a.

FYI, the patch you provided was not sufficient, because it neglected to
arrange for HAVE_USELOCALE to be set by configure.  This meant that the
thread-aware locale API would _never_ be used.

These commits are on the stable-2.0 branch and will be included in Guile
2.0.12.  I'm closing this bug now.

     Thanks,
       Mark

Subject: Two portability patches
From: Thomas Klausner <[email-masked]>
To: [email-masked]
Date: Thu, 30 Oct 2014 00:36:08 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi!

The attached patches against git as of right-now fix two issues:

1.

test does not generally support '==' as comparison operator.
    
It's a bash(1) feature; not even GNU coreutils test(1) supports it.
Use '=' instead.

2.

NetBSD provides newlocale and strcoll_l, but not uselocale.

Please merge them.

Thanks,
 Thomas
>From e984213342d68ab81932baff9c8896bcee2ea704 Mon Sep 17 00:00:00 2001
From: Thomas Klausner <[email-masked]>
Date: Thu, 30 Oct 2014 00:33:39 +0100
Subject: [PATCH 2/2] test does not generally support '==' as comparison
 operator.

It's a bash(1) feature; not even GNU coreutils test(1) supports it.
Use '=' instead.
---
 meta/guile.m4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/guile.m4 b/meta/guile.m4
index 441dcd4..dd3c212 100644
--- a/meta/guile.m4
+++ b/meta/guile.m4
@@ -231,7 +231,7 @@ AC_DEFUN([GUILE_PROGS],
           AC_MSG_ERROR([Guile $_guile_required_version required, but $_guile_prog_version found])
         fi
       fi
-    elif test "$GUILE_EFFECTIVE_VERSION" == "$_major_version.$_minor_version" -a -z "$_micro_version"; then
+    elif test "$GUILE_EFFECTIVE_VERSION" = "$_major_version.$_minor_version" -a -z "$_micro_version"; then
       # Allow prereleases that have the right effective version.
       true
     else
-- 
2.1.2

>From 479533676f8a57dca645f02eeafb5de537a2251b Mon Sep 17 00:00:00 2001
From: Thomas Klausner <[email-masked]>
Date: Thu, 30 Oct 2014 00:33:18 +0100
Subject: [PATCH 1/2] NetBSD provides newlocale and strcoll_l, but not
 uselocale.

Adapt ifdefs to handle this case correctly.
---
 libguile/i18n.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libguile/i18n.c b/libguile/i18n.c
index c6b9b84..6fa99fe 100644
--- a/libguile/i18n.c
+++ b/libguile/i18n.c
@@ -40,7 +40,7 @@
 #include <unicase.h>
 #include <unistr.h>
 
-#if (defined HAVE_NEWLOCALE) && (defined HAVE_STRCOLL_L)
+#if (defined HAVE_NEWLOCALE) && (defined HAVE_STRCOLL_L) && (defined HAVE_USELOCALE)
 /* The GNU thread-aware locale API is documented in ``Thread-Aware Locale
    Model, a Proposal'', by Ulrich Drepper:
 
-- 
2.1.2