1 #ifndef _LINUX_STRING_H_
2 #define _LINUX_STRING_H_
4 /* We don't want strings.h stuff being user by user stuff by accident */
8 #include <linux/compiler.h> /* for inline */
9 #include <linux/types.h> /* for size_t */
10 #include <linux/stddef.h> /* for NULL */
16 extern char * strpbrk(const char *,const char *);
17 extern char * strsep(char **,const char *);
18 extern __kernel_size_t strspn(const char *,const char *);
19 extern __kernel_size_t strcspn(const char *,const char *);
21 extern char *strndup_user(const char __user *, long);
24 * Include machine specific inline routines
26 #include <asm/string.h>
28 #ifndef __HAVE_ARCH_STRCPY
29 extern char * strcpy(char *,const char *);
31 #ifndef __HAVE_ARCH_STRNCPY
32 extern char * strncpy(char *,const char *, __kernel_size_t);
34 #ifndef __HAVE_ARCH_STRLCPY
35 size_t strlcpy(char *, const char *, size_t);
37 #ifndef __HAVE_ARCH_STRCAT
38 extern char * strcat(char *, const char *);
40 #ifndef __HAVE_ARCH_STRNCAT
41 extern char * strncat(char *, const char *, __kernel_size_t);
43 #ifndef __HAVE_ARCH_STRLCAT
44 extern size_t strlcat(char *, const char *, __kernel_size_t);
46 #ifndef __HAVE_ARCH_STRCMP
47 extern int strcmp(const char *,const char *);
49 #ifndef __HAVE_ARCH_STRNCMP
50 extern int strncmp(const char *,const char *,__kernel_size_t);
52 #ifndef __HAVE_ARCH_STRNICMP
53 extern int strnicmp(const char *, const char *, __kernel_size_t);
55 #ifndef __HAVE_ARCH_STRCHR
56 extern char * strchr(const char *,int);
58 #ifndef __HAVE_ARCH_STRNCHR
59 extern char * strnchr(const char *, size_t, int);
61 #ifndef __HAVE_ARCH_STRRCHR
62 extern char * strrchr(const char *,int);
64 #ifndef __HAVE_ARCH_STRSTR
65 extern char * strstr(const char *,const char *);
67 #ifndef __HAVE_ARCH_STRLEN
68 extern __kernel_size_t strlen(const char *);
70 #ifndef __HAVE_ARCH_STRNLEN
71 extern __kernel_size_t strnlen(const char *,__kernel_size_t);
74 #ifndef __HAVE_ARCH_MEMSET
75 extern void * memset(void *,int,__kernel_size_t);
77 #ifndef __HAVE_ARCH_MEMCPY
78 extern void * memcpy(void *,const void *,__kernel_size_t);
80 #ifndef __HAVE_ARCH_MEMMOVE
81 extern void * memmove(void *,const void *,__kernel_size_t);
83 #ifndef __HAVE_ARCH_MEMSCAN
84 extern void * memscan(void *,int,__kernel_size_t);
86 #ifndef __HAVE_ARCH_MEMCMP
87 extern int memcmp(const void *,const void *,__kernel_size_t);
89 #ifndef __HAVE_ARCH_MEMCHR
90 extern void * memchr(const void *,int,__kernel_size_t);
93 extern char *kstrdup(const char *s, gfp_t gfp);
100 #endif /* _LINUX_STRING_H_ */