string.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. #ifndef _LINUX_STRING_H_
  2. #define _LINUX_STRING_H_
  3. #include <linux/types.h> /* for size_t */
  4. #include <linux/stddef.h> /* for NULL */
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. extern char * ___strtok;
  9. extern char * strpbrk(const char *,const char *);
  10. extern char * strtok(char *,const char *);
  11. extern char * strsep(char **,const char *);
  12. extern __kernel_size_t strspn(const char *,const char *);
  13. /*
  14. * Include machine specific inline routines
  15. */
  16. #include <asm/string.h>
  17. #ifndef __HAVE_ARCH_STRCPY
  18. extern char * strcpy(char *,const char *);
  19. #endif
  20. #ifndef __HAVE_ARCH_STRNCPY
  21. extern char * strncpy(char *,const char *, __kernel_size_t);
  22. #endif
  23. #ifndef __HAVE_ARCH_STRLCPY
  24. size_t strlcpy(char *, const char *, size_t);
  25. #endif
  26. #ifndef __HAVE_ARCH_STRCAT
  27. extern char * strcat(char *, const char *);
  28. #endif
  29. #ifndef __HAVE_ARCH_STRNCAT
  30. extern char * strncat(char *, const char *, __kernel_size_t);
  31. #endif
  32. #ifndef __HAVE_ARCH_STRCMP
  33. extern int strcmp(const char *,const char *);
  34. #endif
  35. #ifndef __HAVE_ARCH_STRNCMP
  36. extern int strncmp(const char *,const char *,__kernel_size_t);
  37. #endif
  38. #ifndef __HAVE_ARCH_STRCASECMP
  39. int strcasecmp(const char *s1, const char *s2);
  40. #endif
  41. #ifndef __HAVE_ARCH_STRNCASECMP
  42. extern int strncasecmp(const char *s1, const char *s2, __kernel_size_t len);
  43. #endif
  44. #ifndef __HAVE_ARCH_STRCHR
  45. extern char * strchr(const char *,int);
  46. #endif
  47. #ifndef __HAVE_ARCH_STRRCHR
  48. extern char * strrchr(const char *,int);
  49. #endif
  50. #include <linux/linux_string.h>
  51. #ifndef __HAVE_ARCH_STRSTR
  52. extern char * strstr(const char *,const char *);
  53. #endif
  54. #ifndef __HAVE_ARCH_STRLEN
  55. extern __kernel_size_t strlen(const char *);
  56. #endif
  57. #ifndef __HAVE_ARCH_STRNLEN
  58. extern __kernel_size_t strnlen(const char *,__kernel_size_t);
  59. #endif
  60. #ifndef __HAVE_ARCH_STRDUP
  61. extern char * strdup(const char *);
  62. #endif
  63. #ifndef __HAVE_ARCH_STRSWAB
  64. extern char * strswab(const char *);
  65. #endif
  66. #ifndef __HAVE_ARCH_MEMSET
  67. extern void * memset(void *,int,__kernel_size_t);
  68. #endif
  69. #ifndef __HAVE_ARCH_MEMCPY
  70. extern void * memcpy(void *,const void *,__kernel_size_t);
  71. #endif
  72. #ifndef __HAVE_ARCH_MEMMOVE
  73. extern void * memmove(void *,const void *,__kernel_size_t);
  74. #endif
  75. #ifndef __HAVE_ARCH_MEMSCAN
  76. extern void * memscan(void *,int,__kernel_size_t);
  77. #endif
  78. #ifndef __HAVE_ARCH_MEMCMP
  79. extern int memcmp(const void *,const void *,__kernel_size_t);
  80. #endif
  81. #ifndef __HAVE_ARCH_MEMCHR
  82. extern void * memchr(const void *,int,__kernel_size_t);
  83. #endif
  84. #ifndef __HAVE_ARCH_MEMCHR_INV
  85. void *memchr_inv(const void *, int, size_t);
  86. #endif
  87. unsigned long ustrtoul(const char *cp, char **endp, unsigned int base);
  88. unsigned long long ustrtoull(const char *cp, char **endp, unsigned int base);
  89. #ifdef __cplusplus
  90. }
  91. #endif
  92. #endif /* _LINUX_STRING_H_ */