Pull ar-k0-usage into release branch
[sfrench/cifs-2.6.git] / include / linux / string.h
1 #ifndef _LINUX_STRING_H_
2 #define _LINUX_STRING_H_
3
4 /* We don't want strings.h stuff being user by user stuff by accident */
5
6 #ifdef __KERNEL__
7
8 #include <linux/compiler.h>     /* for inline */
9 #include <linux/types.h>        /* for size_t */
10 #include <linux/stddef.h>       /* for NULL */
11
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15
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 *);
20
21 /*
22  * Include machine specific inline routines
23  */
24 #include <asm/string.h>
25
26 #ifndef __HAVE_ARCH_STRCPY
27 extern char * strcpy(char *,const char *);
28 #endif
29 #ifndef __HAVE_ARCH_STRNCPY
30 extern char * strncpy(char *,const char *, __kernel_size_t);
31 #endif
32 #ifndef __HAVE_ARCH_STRLCPY
33 size_t strlcpy(char *, const char *, size_t);
34 #endif
35 #ifndef __HAVE_ARCH_STRCAT
36 extern char * strcat(char *, const char *);
37 #endif
38 #ifndef __HAVE_ARCH_STRNCAT
39 extern char * strncat(char *, const char *, __kernel_size_t);
40 #endif
41 #ifndef __HAVE_ARCH_STRLCAT
42 extern size_t strlcat(char *, const char *, __kernel_size_t);
43 #endif
44 #ifndef __HAVE_ARCH_STRCMP
45 extern int strcmp(const char *,const char *);
46 #endif
47 #ifndef __HAVE_ARCH_STRNCMP
48 extern int strncmp(const char *,const char *,__kernel_size_t);
49 #endif
50 #ifndef __HAVE_ARCH_STRNICMP
51 extern int strnicmp(const char *, const char *, __kernel_size_t);
52 #endif
53 #ifndef __HAVE_ARCH_STRCHR
54 extern char * strchr(const char *,int);
55 #endif
56 #ifndef __HAVE_ARCH_STRNCHR
57 extern char * strnchr(const char *, size_t, int);
58 #endif
59 #ifndef __HAVE_ARCH_STRRCHR
60 extern char * strrchr(const char *,int);
61 #endif
62 #ifndef __HAVE_ARCH_STRSTR
63 extern char * strstr(const char *,const char *);
64 #endif
65 #ifndef __HAVE_ARCH_STRLEN
66 extern __kernel_size_t strlen(const char *);
67 #endif
68 #ifndef __HAVE_ARCH_STRNLEN
69 extern __kernel_size_t strnlen(const char *,__kernel_size_t);
70 #endif
71
72 #ifndef __HAVE_ARCH_MEMSET
73 extern void * memset(void *,int,__kernel_size_t);
74 #endif
75 #ifndef __HAVE_ARCH_MEMCPY
76 extern void * memcpy(void *,const void *,__kernel_size_t);
77 #endif
78 #ifndef __HAVE_ARCH_MEMMOVE
79 extern void * memmove(void *,const void *,__kernel_size_t);
80 #endif
81 #ifndef __HAVE_ARCH_MEMSCAN
82 extern void * memscan(void *,int,__kernel_size_t);
83 #endif
84 #ifndef __HAVE_ARCH_MEMCMP
85 extern int memcmp(const void *,const void *,__kernel_size_t);
86 #endif
87 #ifndef __HAVE_ARCH_MEMCHR
88 extern void * memchr(const void *,int,__kernel_size_t);
89 #endif
90
91 extern char *kstrdup(const char *s, gfp_t gfp);
92
93 #ifdef __cplusplus
94 }
95 #endif
96
97 #endif
98 #endif /* _LINUX_STRING_H_ */