This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Faster strspn/strcspn implementation.


On Fri, 28 Dec 2012, OndÅ~Yej BÃlka wrote:

> diff --git a/string/bits/string2.h b/string/bits/string2.h
> index 2e560de..de82b77 100644
> --- a/string/bits/string2.h
> +++ b/string/bits/string2.h
> @@ -925,8 +925,26 @@ __stpcpy_small (char *__dest,
>  		  ? strcmp (s1, s2) : strncmp (s1, s2, n)))
>  #endif
>  
> +#ifdef NO_STRSPN4_WEAK_ALIAS
> +/* Redefition without weak alias causes error, so we need to disable
> this.*/
>  extern size_t __strspn4  (const char *a,unsigned char a0,unsigned char a1,unsigned char a2,unsigned char a3);

An installed header such as string/bits/string2.h must not depend on 
user-namespace symbols such as NO_STRSPN4_WEAK_ALIAS, or use such symbols 
as 'a'.  Put such code, which should not be needed in the installed 
header, in include/bits/string2.h (the internal header) instead.

-- 
Joseph S. Myers
joseph@codesourcery.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]