bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gnulib] Re: Question concerning c-ctype, c-strcase, c-strcasest


From: Yoann Vandoorselaere
Subject: Re: [bug-gnulib] Re: Question concerning c-ctype, c-strcase, c-strcasestr and c-strstr modules
Date: Tue, 14 Nov 2006 12:01:37 +0100

On Tue, 2006-11-14 at 11:40 +0100, Bruno Haible wrote:
> Yoann Vandoorselaere wrote:
> > Solaris 9 apparently lack the strcasestr() function.
> 
> If the program needs strcasestr(), then it needs the 'strcasestr' module.
> It defines a replacement for strcasestr().
> 
> > Might we modify the 
> > c-strcasestr module so that it provide a replacement for platform
> > lacking the function now that one is identified?
> 
> The c-strcasestr module defines a variant of strcasestr that ignores the
> user's locale. c_strcasestr() and strcasestr() are not equivalent.

Quoting Eric Blake:

"However, if we have a platform missing strcasestr, then using
c_strcasestr as the substitute implementation is probably okay, because
that platform would probably be broken in other areas, such as locale
support, such that a locale-aware replacement strcasestr would not be
worth the effort."


Also, depending on the program or library using the fallback GnuLib
module, you might not want a version of the function supporting locale,
for performance reason or because of the number of dependencies it would
bring, and the resulting library size. 

As an example, on a recent Linux system, importing the strcasestr module
generate a library more than twice the size of one importing
c_strcasestr.

-- 
Yoann Vandoorselaere | Responsable R&D / CTO | PreludeIDS Technologies
Tel: +33 (0)8 70 70 21 58                  Fax: +33(0)4 78 42 21 58
http://www.prelude-ids.com





reply via email to

[Prev in Thread] Current Thread [Next in Thread]