GNU bug report logs - #79300
fold-nbsp test failure

Previous Next

Package: coreutils;

Reported by: Bruno Haible <bruno <at> clisp.org>

Date: Sun, 24 Aug 2025 07:51:02 UTC

Severity: normal

Tags: fixed

Done: Collin Funk <collin.funk1 <at> gmail.com>

Full log


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

From: Pádraig Brady <P <at> draigBrady.com>
To: Collin Funk <collin.funk1 <at> gmail.com>
Cc: 79300 <at> debbugs.gnu.org, bruno <at> clisp.org
Subject: Re: bug#79300: fold-nbsp test failure
Date: Wed, 3 Sep 2025 08:23:17 +0100
On 03/09/2025 05:04, Collin Funk wrote:
> Pádraig Brady <P <at> draigBrady.com> writes:
> 
>>> Thanks, I forgot about that function. That sounds like a good idea
>>> to
>>> me. We can be nice to people who do not use glibc.
>>> We will have to hoist the 'posixly_correct' check out of it before
>>> though. Technically POSIX says that 'fold -s' should only break at
>>> <blank> characters. But I rather avoid adding more
>>> getenv ("POSIXLY_CORRECT") to programs that do not yet have them.
>>
>> Yes I agree that fold should not depend on POSIXLY_CORRECT,
>> so c32isnbspace() should only look at the passed char.
> 
> This patch should do the trick. It fixes it on Solaris 11.4 (cfarm215).
> I couldn't reproduce the failure seen on the CI machines in my NetBSD 10
> VM. But I see no reason why this fix wouldn't work there too.
> 
> Will push it tomorrow.

I would have left iswnbspace() in wc.c, calling into c32isnbspace(),
otherwise the double negative with posixly_correct is awkward.
Anyway the logic looks good.

thanks!
Padraig




This bug report was last modified 10 days ago.

Previous Next


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