string.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. #if 0 /* not used - was: #ifndef __HAVE_ARCH_STRNICMP */
  36. extern int strnicmp(const char *, const char *, __kernel_size_t);
  37. #endif
  38. #ifndef __HAVE_ARCH_STRCHR
  39. extern char * strchr(const char *,int);
  40. #endif
  41. #ifndef __HAVE_ARCH_STRRCHR
  42. extern char * strrchr(const char *,int);
  43. #endif
  44. #ifndef __HAVE_ARCH_STRSTR
  45. extern char * strstr(const char *,const char *);
  46. #endif
  47. #ifndef __HAVE_ARCH_STRLEN
  48. extern __kernel_size_t strlen(const char *);
  49. #endif
  50. #ifndef __HAVE_ARCH_STRNLEN
  51. extern __kernel_size_t strnlen(const char *,__kernel_size_t);
  52. #endif
  53. #ifndef __HAVE_ARCH_STRDUP
  54. extern char * strdup(const char *);
  55. #endif
  56. #ifndef __HAVE_ARCH_STRSWAB
  57. extern char * strswab(const char *);
  58. #endif
  59. #ifndef __HAVE_ARCH_MEMSET
  60. extern void * memset(void *,int,__kernel_size_t);
  61. #endif
  62. #ifndef __HAVE_ARCH_MEMCPY
  63. extern void * memcpy(void *,const void *,__kernel_size_t);
  64. #endif
  65. #ifndef __HAVE_ARCH_MEMMOVE
  66. extern void * memmove(void *,const void *,__kernel_size_t);
  67. #endif
  68. #ifndef __HAVE_ARCH_MEMSCAN
  69. extern void * memscan(void *,int,__kernel_size_t);
  70. #endif
  71. #ifndef __HAVE_ARCH_MEMCMP
  72. extern int memcmp(const void *,const void *,__kernel_size_t);
  73. #endif
  74. #ifndef __HAVE_ARCH_MEMCHR
  75. extern void * memchr(const void *,int,__kernel_size_t);
  76. #endif
  77. #ifdef __cplusplus
  78. }
  79. #endif
  80. #endif /* _LINUX_STRING_H_ */