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 */
10 #include <linux/compiler.h> /* for inline */
11 #include <linux/types.h> /* for size_t */
12 #include <linux/stddef.h> /* for NULL */
14 extern char *strndup_user(const char __user
*, long);
17 * Include machine specific inline routines
19 #include <asm/string.h>
21 #ifndef __HAVE_ARCH_STRCPY
22 extern char * strcpy(char *,const char *);
24 #ifndef __HAVE_ARCH_STRNCPY
25 extern char * strncpy(char *,const char *, __kernel_size_t
);
27 #ifndef __HAVE_ARCH_STRLCPY
28 size_t strlcpy(char *, const char *, size_t);
30 #ifndef __HAVE_ARCH_STRCAT
31 extern char * strcat(char *, const char *);
33 #ifndef __HAVE_ARCH_STRNCAT
34 extern char * strncat(char *, const char *, __kernel_size_t
);
36 #ifndef __HAVE_ARCH_STRLCAT
37 extern size_t strlcat(char *, const char *, __kernel_size_t
);
39 #ifndef __HAVE_ARCH_STRCMP
40 extern int strcmp(const char *,const char *);
42 #ifndef __HAVE_ARCH_STRNCMP
43 extern int strncmp(const char *,const char *,__kernel_size_t
);
45 #ifndef __HAVE_ARCH_STRNICMP
46 extern int strnicmp(const char *, const char *, __kernel_size_t
);
48 #ifndef __HAVE_ARCH_STRCASECMP
49 extern int strcasecmp(const char *s1
, const char *s2
);
51 #ifndef __HAVE_ARCH_STRNCASECMP
52 extern int strncasecmp(const char *s1
, const char *s2
, size_t n
);
54 #ifndef __HAVE_ARCH_STRCHR
55 extern char * strchr(const char *,int);
57 #ifndef __HAVE_ARCH_STRNCHR
58 extern char * strnchr(const char *, size_t, int);
60 #ifndef __HAVE_ARCH_STRRCHR
61 extern char * strrchr(const char *,int);
63 extern char * strstrip(char *);
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
);
73 #ifndef __HAVE_ARCH_STRPBRK
74 extern char * strpbrk(const char *,const char *);
76 #ifndef __HAVE_ARCH_STRSEP
77 extern char * strsep(char **,const char *);
79 #ifndef __HAVE_ARCH_STRSPN
80 extern __kernel_size_t
strspn(const char *,const char *);
82 #ifndef __HAVE_ARCH_STRCSPN
83 extern __kernel_size_t
strcspn(const char *,const char *);
86 #ifndef __HAVE_ARCH_MEMSET
87 extern void * memset(void *,int,__kernel_size_t
);
89 #ifndef __HAVE_ARCH_MEMCPY
90 extern void * memcpy(void *,const void *,__kernel_size_t
);
92 #ifndef __HAVE_ARCH_MEMMOVE
93 extern void * memmove(void *,const void *,__kernel_size_t
);
95 #ifndef __HAVE_ARCH_MEMSCAN
96 extern void * memscan(void *,int,__kernel_size_t
);
98 #ifndef __HAVE_ARCH_MEMCMP
99 extern int memcmp(const void *,const void *,__kernel_size_t
);
101 #ifndef __HAVE_ARCH_MEMCHR
102 extern void * memchr(const void *,int,__kernel_size_t
);
105 extern char *kstrdup(const char *s
, gfp_t gfp
);
106 extern char *kstrndup(const char *s
, size_t len
, gfp_t gfp
);
107 extern void *kmemdup(const void *src
, size_t len
, gfp_t gfp
);
109 extern char **argv_split(gfp_t gfp
, const char *str
, int *argcp
);
110 extern void argv_free(char **argv
);
112 extern bool sysfs_streq(const char *s1
, const char *s2
);
114 extern ssize_t
memory_read_from_buffer(void *to
, size_t count
, loff_t
*ppos
,
115 const void *from
, size_t available
);
118 #endif /* _LINUX_STRING_H_ */