wdenk | 60b1bd0 | 2001-10-17 20:21:50 +0000 | [diff] [blame] | 1 | #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 |
| 8 | extern "C" { |
| 9 | #endif |
| 10 | |
| 11 | extern char * ___strtok; |
| 12 | extern char * strpbrk(const char *,const char *); |
| 13 | extern char * strtok(char *,const char *); |
| 14 | extern char * strsep(char **,const char *); |
| 15 | extern __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 Hofstee | 5afe73f | 2014-10-08 22:57:49 +0200 | [diff] [blame] | 23 | #ifndef __HAVE_ARCH_BCOPY |
| 24 | char *bcopy(const char *src, char *dest, int count); |
| 25 | #endif |
| 26 | |
wdenk | 60b1bd0 | 2001-10-17 20:21:50 +0000 | [diff] [blame] | 27 | #ifndef __HAVE_ARCH_STRCPY |
| 28 | extern char * strcpy(char *,const char *); |
| 29 | #endif |
| 30 | #ifndef __HAVE_ARCH_STRNCPY |
| 31 | extern char * strncpy(char *,const char *, __kernel_size_t); |
| 32 | #endif |
| 33 | #ifndef __HAVE_ARCH_STRCAT |
| 34 | extern char * strcat(char *, const char *); |
| 35 | #endif |
| 36 | #ifndef __HAVE_ARCH_STRNCAT |
| 37 | extern char * strncat(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 |
Simon Glass | b1f17bf | 2012-12-05 14:46:35 +0000 | [diff] [blame] | 45 | #ifndef __HAVE_ARCH_STRCASECMP |
| 46 | int strcasecmp(const char *s1, const char *s2); |
| 47 | #endif |
| 48 | #ifndef __HAVE_ARCH_STRNCASECMP |
| 49 | extern int strncasecmp(const char *s1, const char *s2, __kernel_size_t len); |
wdenk | 60b1bd0 | 2001-10-17 20:21:50 +0000 | [diff] [blame] | 50 | #endif |
| 51 | #ifndef __HAVE_ARCH_STRCHR |
| 52 | extern char * strchr(const char *,int); |
| 53 | #endif |
| 54 | #ifndef __HAVE_ARCH_STRRCHR |
| 55 | extern char * strrchr(const char *,int); |
| 56 | #endif |
Joe Hershberger | e772cb3 | 2012-12-11 22:16:18 -0600 | [diff] [blame] | 57 | #include <linux/linux_string.h> |
wdenk | 60b1bd0 | 2001-10-17 20:21:50 +0000 | [diff] [blame] | 58 | #ifndef __HAVE_ARCH_STRSTR |
| 59 | extern char * strstr(const char *,const char *); |
| 60 | #endif |
| 61 | #ifndef __HAVE_ARCH_STRLEN |
| 62 | extern __kernel_size_t strlen(const char *); |
| 63 | #endif |
| 64 | #ifndef __HAVE_ARCH_STRNLEN |
| 65 | extern __kernel_size_t strnlen(const char *,__kernel_size_t); |
| 66 | #endif |
| 67 | #ifndef __HAVE_ARCH_STRDUP |
| 68 | extern char * strdup(const char *); |
| 69 | #endif |
wdenk | 27aa818 | 2004-03-23 22:37:33 +0000 | [diff] [blame] | 70 | #ifndef __HAVE_ARCH_STRSWAB |
wdenk | c3f9d49 | 2004-03-14 00:59:59 +0000 | [diff] [blame] | 71 | extern char * strswab(const char *); |
| 72 | #endif |
wdenk | 60b1bd0 | 2001-10-17 20:21:50 +0000 | [diff] [blame] | 73 | |
| 74 | #ifndef __HAVE_ARCH_MEMSET |
| 75 | extern void * memset(void *,int,__kernel_size_t); |
| 76 | #endif |
| 77 | #ifndef __HAVE_ARCH_MEMCPY |
| 78 | extern void * memcpy(void *,const void *,__kernel_size_t); |
| 79 | #endif |
| 80 | #ifndef __HAVE_ARCH_MEMMOVE |
| 81 | extern void * memmove(void *,const void *,__kernel_size_t); |
| 82 | #endif |
| 83 | #ifndef __HAVE_ARCH_MEMSCAN |
| 84 | extern void * memscan(void *,int,__kernel_size_t); |
| 85 | #endif |
| 86 | #ifndef __HAVE_ARCH_MEMCMP |
| 87 | extern int memcmp(const void *,const void *,__kernel_size_t); |
| 88 | #endif |
| 89 | #ifndef __HAVE_ARCH_MEMCHR |
| 90 | extern void * memchr(const void *,int,__kernel_size_t); |
| 91 | #endif |
Sergey Lapin | dfe64e2 | 2013-01-14 03:46:50 +0000 | [diff] [blame] | 92 | #ifndef __HAVE_ARCH_MEMCHR_INV |
| 93 | void *memchr_inv(const void *, int, size_t); |
| 94 | #endif |
wdenk | 60b1bd0 | 2001-10-17 20:21:50 +0000 | [diff] [blame] | 95 | |
Jeroen Hofstee | 5afe73f | 2014-10-08 22:57:49 +0200 | [diff] [blame] | 96 | unsigned long ustrtoul(const char *cp, char **endp, unsigned int base); |
| 97 | unsigned long long ustrtoull(const char *cp, char **endp, unsigned int base); |
| 98 | |
wdenk | 60b1bd0 | 2001-10-17 20:21:50 +0000 | [diff] [blame] | 99 | #ifdef __cplusplus |
| 100 | } |
| 101 | #endif |
| 102 | |
| 103 | #endif /* _LINUX_STRING_H_ */ |