[klibc] patch: porting module-init-tools 2/4: index
H. Peter Anvin
hpa at zytor.com
Mon May 30 18:27:09 PDT 2005
Vassilis Virvilis wrote:
> This is tiny and has no impact in klib size other that it is polluting
> the namespace.
>
> .bill
>
>
> ------------------------------------------------------------------------
>
> diff -ur ../klibc-orig/include/string.h ./include/string.h
> --- ../klibc-orig/include/string.h 2005-05-20 16:00:56.000000000 +0300
> +++ ./include/string.h 2005-05-30 20:59:05.000000000 +0300
> @@ -41,4 +41,6 @@
> __extern char *strstr(const char *, const char *);
> __extern char *strtok(char *, const char *);
>
> +#define index strchr
> +
> #endif /* _STRING_H */
>
As a macro, that's pretty bad. Make it an inline function, that way
it's not quite so egregorious.
-hpa
More information about the klibc
mailing list