blob: b9fc59469956368dd3cfa323f0fd45e9fe7ae55b [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#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
13extern "C" {
14#endif
15
16extern char * strpbrk(const char *,const char *);
17extern char * strsep(char **,const char *);
18extern __kernel_size_t strspn(const char *,const char *);
19extern __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
27extern char * strcpy(char *,const char *);
28#endif
29#ifndef __HAVE_ARCH_STRNCPY
30extern char * strncpy(char *,const char *, __kernel_size_t);
31#endif
32#ifndef __HAVE_ARCH_STRLCPY
33size_t strlcpy(char *, const char *, size_t);
34#endif
35#ifndef __HAVE_ARCH_STRCAT
36extern char * strcat(char *, const char *);
37#endif
38#ifndef __HAVE_ARCH_STRNCAT
39extern char * strncat(char *, const char *, __kernel_size_t);
40#endif
41#ifndef __HAVE_ARCH_STRLCAT
42extern size_t strlcat(char *, const char *, __kernel_size_t);
43#endif
44#ifndef __HAVE_ARCH_STRCMP
45extern int strcmp(const char *,const char *);
46#endif
47#ifndef __HAVE_ARCH_STRNCMP
48extern int strncmp(const char *,const char *,__kernel_size_t);
49#endif
50#ifndef __HAVE_ARCH_STRNICMP
51extern int strnicmp(const char *, const char *, __kernel_size_t);
52#endif
53#ifndef __HAVE_ARCH_STRCHR
54extern char * strchr(const char *,int);
55#endif
56#ifndef __HAVE_ARCH_STRNCHR
57extern char * strnchr(const char *, size_t, int);
58#endif
59#ifndef __HAVE_ARCH_STRRCHR
60extern char * strrchr(const char *,int);
61#endif
62#ifndef __HAVE_ARCH_STRSTR
63extern char * strstr(const char *,const char *);
64#endif
65#ifndef __HAVE_ARCH_STRLEN
66extern __kernel_size_t strlen(const char *);
67#endif
68#ifndef __HAVE_ARCH_STRNLEN
69extern __kernel_size_t strnlen(const char *,__kernel_size_t);
70#endif
71
72#ifndef __HAVE_ARCH_MEMSET
73extern void * memset(void *,int,__kernel_size_t);
74#endif
75#ifndef __HAVE_ARCH_MEMCPY
76extern void * memcpy(void *,const void *,__kernel_size_t);
77#endif
78#ifndef __HAVE_ARCH_MEMMOVE
79extern void * memmove(void *,const void *,__kernel_size_t);
80#endif
81#ifndef __HAVE_ARCH_MEMSCAN
82extern void * memscan(void *,int,__kernel_size_t);
83#endif
84#ifndef __HAVE_ARCH_MEMCMP
85extern int memcmp(const void *,const void *,__kernel_size_t);
86#endif
87#ifndef __HAVE_ARCH_MEMCHR
88extern void * memchr(const void *,int,__kernel_size_t);
89#endif
90
91#ifdef __cplusplus
92}
93#endif
94
95#endif
96#endif /* _LINUX_STRING_H_ */