[RFC] Faster strspn/strcspn implementation.
Joseph S. Myers
joseph@codesourcery.com
Fri Dec 28 16:49:00 GMT 2012
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
More information about the Libc-alpha
mailing list