acpi: fix integer as NULL pointer warning
[linux-2.6/openmoko-kernel/knife-kernel.git] / include / linux / string.h
blobefdc44593b522054dda0454f105fb0636b8ec0c2
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 */
6 #ifndef __KERNEL__
7 #include <string.h>
8 #else
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 *);
23 #endif
24 #ifndef __HAVE_ARCH_STRNCPY
25 extern char * strncpy(char *,const char *, __kernel_size_t);
26 #endif
27 #ifndef __HAVE_ARCH_STRLCPY
28 size_t strlcpy(char *, const char *, size_t);
29 #endif
30 #ifndef __HAVE_ARCH_STRCAT
31 extern char * strcat(char *, const char *);
32 #endif
33 #ifndef __HAVE_ARCH_STRNCAT
34 extern char * strncat(char *, const char *, __kernel_size_t);
35 #endif
36 #ifndef __HAVE_ARCH_STRLCAT
37 extern size_t strlcat(char *, const char *, __kernel_size_t);
38 #endif
39 #ifndef __HAVE_ARCH_STRCMP
40 extern int strcmp(const char *,const char *);
41 #endif
42 #ifndef __HAVE_ARCH_STRNCMP
43 extern int strncmp(const char *,const char *,__kernel_size_t);
44 #endif
45 #ifndef __HAVE_ARCH_STRNICMP
46 extern int strnicmp(const char *, const char *, __kernel_size_t);
47 #endif
48 #ifndef __HAVE_ARCH_STRCASECMP
49 extern int strcasecmp(const char *s1, const char *s2);
50 #endif
51 #ifndef __HAVE_ARCH_STRNCASECMP
52 extern int strncasecmp(const char *s1, const char *s2, size_t n);
53 #endif
54 #ifndef __HAVE_ARCH_STRCHR
55 extern char * strchr(const char *,int);
56 #endif
57 #ifndef __HAVE_ARCH_STRNCHR
58 extern char * strnchr(const char *, size_t, int);
59 #endif
60 #ifndef __HAVE_ARCH_STRRCHR
61 extern char * strrchr(const char *,int);
62 #endif
63 extern char * strstrip(char *);
64 #ifndef __HAVE_ARCH_STRSTR
65 extern char * strstr(const char *,const char *);
66 #endif
67 #ifndef __HAVE_ARCH_STRLEN
68 extern __kernel_size_t strlen(const char *);
69 #endif
70 #ifndef __HAVE_ARCH_STRNLEN
71 extern __kernel_size_t strnlen(const char *,__kernel_size_t);
72 #endif
73 #ifndef __HAVE_ARCH_STRPBRK
74 extern char * strpbrk(const char *,const char *);
75 #endif
76 #ifndef __HAVE_ARCH_STRSEP
77 extern char * strsep(char **,const char *);
78 #endif
79 #ifndef __HAVE_ARCH_STRSPN
80 extern __kernel_size_t strspn(const char *,const char *);
81 #endif
82 #ifndef __HAVE_ARCH_STRCSPN
83 extern __kernel_size_t strcspn(const char *,const char *);
84 #endif
86 #ifndef __HAVE_ARCH_MEMSET
87 extern void * memset(void *,int,__kernel_size_t);
88 #endif
89 #ifndef __HAVE_ARCH_MEMCPY
90 extern void * memcpy(void *,const void *,__kernel_size_t);
91 #endif
92 #ifndef __HAVE_ARCH_MEMMOVE
93 extern void * memmove(void *,const void *,__kernel_size_t);
94 #endif
95 #ifndef __HAVE_ARCH_MEMSCAN
96 extern void * memscan(void *,int,__kernel_size_t);
97 #endif
98 #ifndef __HAVE_ARCH_MEMCMP
99 extern int memcmp(const void *,const void *,__kernel_size_t);
100 #endif
101 #ifndef __HAVE_ARCH_MEMCHR
102 extern void * memchr(const void *,int,__kernel_size_t);
103 #endif
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 #endif
115 #endif /* _LINUX_STRING_H_ */