1#ifndef _LINUX_STRING_H_
2#define _LINUX_STRING_H_
3
4#include <linux/types.h>
5#include <linux/stddef.h>
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11extern char * ___strtok;
12extern char * strpbrk(const char *,const char *);
13extern char * strtok(char *,const char *);
14extern char * strsep(char **,const char *);
15extern __kernel_size_t strspn(const char *,const char *);
16
17
18
19
20
21#include <asm/string.h>
22
23#ifndef __HAVE_ARCH_STRCPY
24extern char * strcpy(char *,const char *);
25#endif
26#ifndef __HAVE_ARCH_STRNCPY
27extern char * strncpy(char *,const char *, __kernel_size_t);
28#endif
29#ifndef __HAVE_ARCH_STRLCPY
30size_t strlcpy(char *, const char *, size_t);
31#endif
32#ifndef __HAVE_ARCH_STRCAT
33extern char * strcat(char *, const char *);
34#endif
35#ifndef __HAVE_ARCH_STRNCAT
36extern char * strncat(char *, const char *, __kernel_size_t);
37#endif
38#ifndef __HAVE_ARCH_STRLCAT
39size_t strlcat(char *, const char *, size_t);
40#endif
41#ifndef __HAVE_ARCH_STRCMP
42extern int strcmp(const char *,const char *);
43#endif
44#ifndef __HAVE_ARCH_STRNCMP
45extern int strncmp(const char *,const char *,__kernel_size_t);
46#endif
47#ifndef __HAVE_ARCH_STRCASECMP
48int strcasecmp(const char *s1, const char *s2);
49#endif
50#ifndef __HAVE_ARCH_STRNCASECMP
51extern int strncasecmp(const char *s1, const char *s2, __kernel_size_t len);
52#endif
53#ifndef __HAVE_ARCH_STRCHR
54extern char * strchr(const char *,int);
55#endif
56
57
58
59
60
61
62
63
64
65
66
67const char *strchrnul(const char *s, int c);
68
69#ifndef __HAVE_ARCH_STRRCHR
70extern char * strrchr(const char *,int);
71#endif
72#include <linux/linux_string.h>
73#ifndef __HAVE_ARCH_STRSTR
74extern char * strstr(const char *,const char *);
75#endif
76#ifndef __HAVE_ARCH_STRLEN
77extern __kernel_size_t strlen(const char *);
78#endif
79#ifndef __HAVE_ARCH_STRNLEN
80extern __kernel_size_t strnlen(const char *,__kernel_size_t);
81#endif
82
83#ifndef __HAVE_ARCH_STRCSPN
84
85
86
87
88
89
90
91
92
93
94size_t strcspn(const char *s, const char *reject);
95#endif
96
97#ifdef CONFIG_SANDBOX
98# define strdup sandbox_strdup
99# define strndup sandbox_strndup
100#endif
101
102#ifndef __HAVE_ARCH_STRDUP
103extern char * strdup(const char *);
104extern char * strndup(const char *, size_t);
105#endif
106#ifndef __HAVE_ARCH_STRSWAB
107extern char * strswab(const char *);
108#endif
109
110#ifndef __HAVE_ARCH_MEMSET
111extern void * memset(void *,int,__kernel_size_t);
112#endif
113#ifndef __HAVE_ARCH_MEMCPY
114extern void * memcpy(void *,const void *,__kernel_size_t);
115#endif
116#ifndef __HAVE_ARCH_MEMMOVE
117extern void * memmove(void *,const void *,__kernel_size_t);
118#endif
119#ifndef __HAVE_ARCH_MEMSCAN
120extern void * memscan(void *,int,__kernel_size_t);
121#endif
122#ifndef __HAVE_ARCH_MEMCMP
123extern int memcmp(const void *,const void *,__kernel_size_t);
124#endif
125#ifndef __HAVE_ARCH_MEMCHR
126extern void * memchr(const void *,int,__kernel_size_t);
127#endif
128#ifndef __HAVE_ARCH_MEMCHR_INV
129void *memchr_inv(const void *, int, size_t);
130#endif
131
132
133
134
135
136
137
138
139
140
141
142
143char *memdup(const void *src, size_t len);
144
145unsigned long ustrtoul(const char *cp, char **endp, unsigned int base);
146unsigned long long ustrtoull(const char *cp, char **endp, unsigned int base);
147
148#ifdef __cplusplus
149}
150#endif
151
152#endif
153