GNU bug report logs - #17056
dfa.c patch for systems with no locale support

Previous Next

Package: grep;

Reported by: Aharon Robbins <arnold <at> skeeve.com>

Date: Fri, 21 Mar 2014 11:42:01 UTC

Severity: normal

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


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

From: Aharon Robbins <arnold <at> skeeve.com>
To: eggert <at> cs.ucla.edu, arnold <at> skeeve.com, 17056-done <at> debbugs.gnu.org
Subject: Re: bug#17056: dfa.c patch for systems with no locale support
Date: Wed, 26 Mar 2014 22:08:39 +0200
Hi Paul.

> Date: Sun, 23 Mar 2014 14:16:47 -0700
> From: Paul Eggert <eggert <at> cs.ucla.edu>
> To: Aharon Robbins <arnold <at> skeeve.com>, 17056-done <at> debbugs.gnu.org
> Subject: Re: bug#17056: dfa.c patch for systems with no locale support
>
> Aharon Robbins wrote:
>
> > See the original report below
>
> I downloaded the DJGPP sources.  LC_ALL is defined unless one compiles 
> as a freestanding environment, in which case neither LC_ALL nor 
> setlocale are declared.  So my guess is that your correspondent is using 
> a freestanding environment somehow, and the patch that I suggested 
> should work.  It's better to avoid #ifdefs inside functions so I 
> installed this into the grep master (see attached) and am marking this 
> as done; we can always resurrect it if my guess is wrong.

I don't think your change is right:

	#ifndef LC_ALL
	# define setlocale(category, locale) NULL
	#endif

If setlocale isn't available, we want to assume that we DO have a
unibyte locale, in which case we should be defining this as

	# define setlocale(category, locale) ("C")

No?

I will pass the current dfa.c on to my tester, but I think it's still
not quite right.

Thanks,

Arnold




This bug report was last modified 11 years and 112 days ago.

Previous Next


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