string.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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_STRCAT
  24. extern char * strcat(char *, const char *);
  25. #endif
  26. #ifndef __HAVE_ARCH_STRNCAT
  27. extern char * strncat(char *, const char *, __kernel_size_t);
  28. #endif
  29. #ifndef __HAVE_ARCH_STRCMP
  30. extern int strcmp(const char *,const char *);
  31. #endif
  32. #ifndef __HAVE_ARCH_STRNCMP
  33. extern int strncmp(const char *,const char *,__kernel_size_t);
  34. #endif
  35. #ifndef __HAVE_ARCH_STRCASECMP
  36. int strcasecmp(const char *s1, const char *s2);
  37. #endif
  38. #ifndef __HAVE_ARCH_STRNCASECMP
  39. extern int strncasecmp(const char *s1, const char *s2, __kernel_size_t len);
  40. #endif
  41. #ifndef __HAVE_ARCH_STRCHR
  42. extern char * strchr(const char *,int);
  43. #endif
  44. #ifndef __HAVE_ARCH_STRRCHR
  45. extern char * strrchr(const char *,int);
  46. #endif
  47. #include <linux/linux_string.h>
  48. #ifndef __HAVE_ARCH_STRSTR
  49. extern char * strstr(const char *,const char *);
  50. #endif
  51. #ifndef __HAVE_ARCH_STRLEN
  52. extern __kernel_size_t strlen(const char *);
  53. #endif
  54. #ifndef __HAVE_ARCH_STRNLEN
  55. extern __kernel_size_t strnlen(const char *,__kernel_size_t);
  56. #endif
  57. #ifndef __HAVE_ARCH_STRDUP
  58. extern char * strdup(const char *);
  59. #endif
  60. #ifndef __HAVE_ARCH_STRSWAB
  61. extern char * strswab(const char *);
  62. #endif
  63. #ifndef __HAVE_ARCH_MEMSET
  64. extern void * memset(void *,int,__kernel_size_t);
  65. #endif
  66. #ifndef __HAVE_ARCH_MEMCPY
  67. extern void * memcpy(void *,const void *,__kernel_size_t);
  68. #endif
  69. #ifndef __HAVE_ARCH_MEMMOVE
  70. extern void * memmove(void *,const void *,__kernel_size_t);
  71. #endif
  72. #ifndef __HAVE_ARCH_MEMSCAN
  73. extern void * memscan(void *,int,__kernel_size_t);
  74. #endif
  75. #ifndef __HAVE_ARCH_MEMCMP
  76. extern int memcmp(const void *,const void *,__kernel_size_t);
  77. #endif
  78. #ifndef __HAVE_ARCH_MEMCHR
  79. extern void * memchr(const void *,int,__kernel_size_t);
  80. #endif
  81. #ifndef __HAVE_ARCH_MEMCHR_INV
  82. void *memchr_inv(const void *, int, size_t);
  83. #endif
  84. #ifdef __cplusplus
  85. }
  86. #endif
  87. #endif /* _LINUX_STRING_H_ */