X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Flinux%2Fstring.h;h=718c3720a12be743a08bd4087f921b9faa5f797e;hb=6b45ba45fbcd1acc11c88ee1c15ed5fcb49f9e32;hp=62390399b0b1b7e160001abd437fd2020bfee808;hpb=846c2d4a0e076083412604ce6f4145ec49ddb99f;p=u-boot diff --git a/include/linux/string.h b/include/linux/string.h index 62390399b0..718c3720a1 100644 --- a/include/linux/string.h +++ b/include/linux/string.h @@ -26,6 +26,9 @@ extern char * strcpy(char *,const char *); #ifndef __HAVE_ARCH_STRNCPY extern char * strncpy(char *,const char *, __kernel_size_t); #endif +#ifndef __HAVE_ARCH_STRLCPY +size_t strlcpy(char *, const char *, size_t); +#endif #ifndef __HAVE_ARCH_STRCAT extern char * strcat(char *, const char *); #endif @@ -38,15 +41,32 @@ extern int strcmp(const char *,const char *); #ifndef __HAVE_ARCH_STRNCMP extern int strncmp(const char *,const char *,__kernel_size_t); #endif -#if 0 /* not used - was: #ifndef __HAVE_ARCH_STRNICMP */ -extern int strnicmp(const char *, const char *, __kernel_size_t); +#ifndef __HAVE_ARCH_STRCASECMP +int strcasecmp(const char *s1, const char *s2); +#endif +#ifndef __HAVE_ARCH_STRNCASECMP +extern int strncasecmp(const char *s1, const char *s2, __kernel_size_t len); #endif #ifndef __HAVE_ARCH_STRCHR extern char * strchr(const char *,int); #endif + +/** + * strchrnul() - return position of a character in the string, or end of string + * + * The strchrnul() function is like strchr() except that if c is not found + * in s, then it returns a pointer to the nul byte at the end of s, rather than + * NULL + * @s: string to search + * @c: character to search for + * @return position of @c in @s, or end of @s if not found + */ +const char *strchrnul(const char *s, int c); + #ifndef __HAVE_ARCH_STRRCHR extern char * strrchr(const char *,int); #endif +#include #ifndef __HAVE_ARCH_STRSTR extern char * strstr(const char *,const char *); #endif @@ -81,6 +101,12 @@ extern int memcmp(const void *,const void *,__kernel_size_t); #ifndef __HAVE_ARCH_MEMCHR extern void * memchr(const void *,int,__kernel_size_t); #endif +#ifndef __HAVE_ARCH_MEMCHR_INV +void *memchr_inv(const void *, int, size_t); +#endif + +unsigned long ustrtoul(const char *cp, char **endp, unsigned int base); +unsigned long long ustrtoull(const char *cp, char **endp, unsigned int base); #ifdef __cplusplus }