blob: 091ccab395b96e2d582c0ed405d3aef95da9e6db [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
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
Masahiro Yamada0588ce12014-11-20 21:20:32 +090029#ifndef __HAVE_ARCH_STRLCPY
30size_t strlcpy(char *, const char *, size_t);
31#endif
wdenk60b1bd02001-10-17 20:21:50 +000032#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_STRCMP
39extern int strcmp(const char *,const char *);
40#endif
41#ifndef __HAVE_ARCH_STRNCMP
42extern int strncmp(const char *,const char *,__kernel_size_t);
43#endif
Simon Glass459af692012-12-05 14:46:35 +000044#ifndef __HAVE_ARCH_STRCASECMP
45int strcasecmp(const char *s1, const char *s2);
46#endif
47#ifndef __HAVE_ARCH_STRNCASECMP
48extern int strncasecmp(const char *s1, const char *s2, __kernel_size_t len);
wdenk60b1bd02001-10-17 20:21:50 +000049#endif
50#ifndef __HAVE_ARCH_STRCHR
51extern char * strchr(const char *,int);
52#endif
53#ifndef __HAVE_ARCH_STRRCHR
54extern char * strrchr(const char *,int);
55#endif
Joe Hershberger32ec63c2012-12-11 22:16:18 -060056#include <linux/linux_string.h>
wdenk60b1bd02001-10-17 20:21:50 +000057#ifndef __HAVE_ARCH_STRSTR
58extern char * strstr(const char *,const char *);
59#endif
60#ifndef __HAVE_ARCH_STRLEN
61extern __kernel_size_t strlen(const char *);
62#endif
63#ifndef __HAVE_ARCH_STRNLEN
64extern __kernel_size_t strnlen(const char *,__kernel_size_t);
65#endif
66#ifndef __HAVE_ARCH_STRDUP
67extern char * strdup(const char *);
68#endif
wdenk8d4d1f62004-03-23 22:37:33 +000069#ifndef __HAVE_ARCH_STRSWAB
wdenkacd9b102004-03-14 00:59:59 +000070extern char * strswab(const char *);
71#endif
wdenk60b1bd02001-10-17 20:21:50 +000072
73#ifndef __HAVE_ARCH_MEMSET
74extern void * memset(void *,int,__kernel_size_t);
75#endif
76#ifndef __HAVE_ARCH_MEMCPY
77extern void * memcpy(void *,const void *,__kernel_size_t);
78#endif
79#ifndef __HAVE_ARCH_MEMMOVE
80extern void * memmove(void *,const void *,__kernel_size_t);
81#endif
82#ifndef __HAVE_ARCH_MEMSCAN
83extern void * memscan(void *,int,__kernel_size_t);
84#endif
85#ifndef __HAVE_ARCH_MEMCMP
86extern int memcmp(const void *,const void *,__kernel_size_t);
87#endif
88#ifndef __HAVE_ARCH_MEMCHR
89extern void * memchr(const void *,int,__kernel_size_t);
90#endif
Sergey Lapin3a38a552013-01-14 03:46:50 +000091#ifndef __HAVE_ARCH_MEMCHR_INV
92void *memchr_inv(const void *, int, size_t);
93#endif
wdenk60b1bd02001-10-17 20:21:50 +000094
Jeroen Hofstee937824b2014-10-08 22:57:49 +020095unsigned long ustrtoul(const char *cp, char **endp, unsigned int base);
96unsigned long long ustrtoull(const char *cp, char **endp, unsigned int base);
97
wdenk60b1bd02001-10-17 20:21:50 +000098#ifdef __cplusplus
99}
100#endif
101
102#endif /* _LINUX_STRING_H_ */