blob: c7047ba0bca6a8bd191013eae45aea7307b71552 [file] [log] [blame]
wdenk60b1bd02001-10-17 20:21:50 +00001#ifndef _LINUX_STRING_H_
2#define _LINUX_STRING_H_
3
4#include <linux/types.h> /* for size_t */
5#include <linux/stddef.h> /* for NULL */
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 * Include machine specific inline routines
20 */
21#include <asm/string.h>
22
Jeroen Hofstee937824b2014-10-08 22:57:49 +020023#ifndef __HAVE_ARCH_BCOPY
24char *bcopy(const char *src, char *dest, int count);
25#endif
26
wdenk60b1bd02001-10-17 20:21:50 +000027#ifndef __HAVE_ARCH_STRCPY
28extern char * strcpy(char *,const char *);
29#endif
30#ifndef __HAVE_ARCH_STRNCPY
31extern char * strncpy(char *,const char *, __kernel_size_t);
32#endif
Masahiro Yamada0588ce12014-11-20 21:20:32 +090033#ifndef __HAVE_ARCH_STRLCPY
34size_t strlcpy(char *, const char *, size_t);
35#endif
wdenk60b1bd02001-10-17 20:21:50 +000036#ifndef __HAVE_ARCH_STRCAT
37extern char * strcat(char *, const char *);
38#endif
39#ifndef __HAVE_ARCH_STRNCAT
40extern char * strncat(char *, const char *, __kernel_size_t);
41#endif
42#ifndef __HAVE_ARCH_STRCMP
43extern int strcmp(const char *,const char *);
44#endif
45#ifndef __HAVE_ARCH_STRNCMP
46extern int strncmp(const char *,const char *,__kernel_size_t);
47#endif
Simon Glass459af692012-12-05 14:46:35 +000048#ifndef __HAVE_ARCH_STRCASECMP
49int strcasecmp(const char *s1, const char *s2);
50#endif
51#ifndef __HAVE_ARCH_STRNCASECMP
52extern int strncasecmp(const char *s1, const char *s2, __kernel_size_t len);
wdenk60b1bd02001-10-17 20:21:50 +000053#endif
54#ifndef __HAVE_ARCH_STRCHR
55extern char * strchr(const char *,int);
56#endif
57#ifndef __HAVE_ARCH_STRRCHR
58extern char * strrchr(const char *,int);
59#endif
Joe Hershberger32ec63c2012-12-11 22:16:18 -060060#include <linux/linux_string.h>
wdenk60b1bd02001-10-17 20:21:50 +000061#ifndef __HAVE_ARCH_STRSTR
62extern char * strstr(const char *,const char *);
63#endif
64#ifndef __HAVE_ARCH_STRLEN
65extern __kernel_size_t strlen(const char *);
66#endif
67#ifndef __HAVE_ARCH_STRNLEN
68extern __kernel_size_t strnlen(const char *,__kernel_size_t);
69#endif
70#ifndef __HAVE_ARCH_STRDUP
71extern char * strdup(const char *);
72#endif
wdenk8d4d1f62004-03-23 22:37:33 +000073#ifndef __HAVE_ARCH_STRSWAB
wdenkacd9b102004-03-14 00:59:59 +000074extern char * strswab(const char *);
75#endif
wdenk60b1bd02001-10-17 20:21:50 +000076
77#ifndef __HAVE_ARCH_MEMSET
78extern void * memset(void *,int,__kernel_size_t);
79#endif
80#ifndef __HAVE_ARCH_MEMCPY
81extern void * memcpy(void *,const void *,__kernel_size_t);
82#endif
83#ifndef __HAVE_ARCH_MEMMOVE
84extern void * memmove(void *,const void *,__kernel_size_t);
85#endif
86#ifndef __HAVE_ARCH_MEMSCAN
87extern void * memscan(void *,int,__kernel_size_t);
88#endif
89#ifndef __HAVE_ARCH_MEMCMP
90extern int memcmp(const void *,const void *,__kernel_size_t);
91#endif
92#ifndef __HAVE_ARCH_MEMCHR
93extern void * memchr(const void *,int,__kernel_size_t);
94#endif
Sergey Lapin3a38a552013-01-14 03:46:50 +000095#ifndef __HAVE_ARCH_MEMCHR_INV
96void *memchr_inv(const void *, int, size_t);
97#endif
wdenk60b1bd02001-10-17 20:21:50 +000098
Jeroen Hofstee937824b2014-10-08 22:57:49 +020099unsigned long ustrtoul(const char *cp, char **endp, unsigned int base);
100unsigned long long ustrtoull(const char *cp, char **endp, unsigned int base);
101
wdenk60b1bd02001-10-17 20:21:50 +0000102#ifdef __cplusplus
103}
104#endif
105
106#endif /* _LINUX_STRING_H_ */