5 extern void *__memccpy (void *__dest, const void *__src,
8 extern size_t __strnlen (const char *__string, size_t __maxlen)
11 extern char *__strsep (char **__stringp, const char *__delim);
13 extern int __strverscmp (const char *__s1, const char *__s2)
16 extern int __strncasecmp (const char *__s1, const char *__s2,
20 extern int __strcasecmp (const char *__s1, const char *__s2)
23 extern char *__strcasestr (const char *__haystack, const char *__needle)
26 extern char *__strdup (const char *__string)
28 extern char *__strndup (const char *__string, size_t __n)
31 extern void *__rawmemchr (const void *__s, int __c)
34 extern char *__strchrnul (const char *__s, int __c)
37 extern void *__memrchr (const void *__s, int __c, size_t __n)
40 extern void *__memchr (const void *__s, int __c, size_t __n)
43 extern int __ffs (int __i) __attribute__ ((const));
45 extern char *__strerror_r (int __errnum, char *__buf, size_t __buflen);
47 /* Now the real definitions. We do this here since some of the functions
48 above are defined as macros in the headers. */
49 #include <string/string.h>
51 extern __typeof (strcoll_l) __strcoll_l;
52 extern __typeof (strxfrm_l) __strxfrm_l;
53 extern __typeof (strcasecmp_l) __strcasecmp_l;
54 extern __typeof (strncasecmp_l) __strncasecmp_l;
56 /* Alternative version which doesn't pollute glibc's namespace. */
59 # define strndupa(s, n) \
62 const char *__old = (s); \
63 size_t __len = __strnlen (__old, (n)); \
64 char *__new = (char *) __builtin_alloca (__len + 1); \
65 __new[__len] = '\0'; \
66 (char *) memcpy (__new, __old, __len); \
70 libc_hidden_proto (__mempcpy)
71 libc_hidden_proto (__stpcpy)
72 libc_hidden_proto (__stpncpy)
73 libc_hidden_proto (__rawmemchr)
74 libc_hidden_proto (__strcasecmp)
75 libc_hidden_proto (__strcasecmp_l)
76 libc_hidden_proto (__strncasecmp_l)
77 libc_hidden_proto (__strdup)
78 libc_hidden_proto (__strndup)
79 libc_hidden_proto (__strerror_r)
80 libc_hidden_proto (__strverscmp)
81 libc_hidden_proto (basename)
82 libc_hidden_proto (strcoll)
83 libc_hidden_proto (__strcoll_l)
84 libc_hidden_proto (__strxfrm_l)
85 libc_hidden_proto (__strtok_r)
86 extern char *__strsep_g (char **__stringp, const char *__delim);
87 libc_hidden_proto (__strsep_g)
88 libc_hidden_proto (strnlen)
90 libc_hidden_builtin_proto (memchr)
91 libc_hidden_builtin_proto (memcpy)
92 libc_hidden_builtin_proto (mempcpy)
93 libc_hidden_builtin_proto (memcmp)
94 libc_hidden_builtin_proto (memmove)
95 libc_hidden_builtin_proto (memset)
96 libc_hidden_builtin_proto (strcat)
97 libc_hidden_builtin_proto (strchr)
98 libc_hidden_builtin_proto (strcmp)
99 libc_hidden_builtin_proto (strcpy)
100 libc_hidden_builtin_proto (strcspn)
101 libc_hidden_builtin_proto (strlen)
102 libc_hidden_builtin_proto (strncmp)
103 libc_hidden_builtin_proto (strncpy)
104 libc_hidden_builtin_proto (strpbrk)
105 libc_hidden_builtin_proto (stpcpy)
106 libc_hidden_builtin_proto (strrchr)
107 libc_hidden_builtin_proto (strspn)
108 libc_hidden_builtin_proto (strstr)
109 libc_hidden_builtin_proto (ffs)
113 # define index(s, c) (strchr ((s), (c)))
116 # define rindex(s, c) (strrchr ((s), (c)))
120 extern void *__memcpy_chk (void *__restrict __dest,
121 const void *__restrict __src, size_t __len,
122 size_t __destlen) __THROW;
123 extern void *__memmove_chk (void *__dest, const void *__src, size_t __len,
124 size_t __destlen) __THROW;
125 extern void *__mempcpy_chk (void *__restrict __dest,
126 const void *__restrict __src, size_t __len,
127 size_t __destlen) __THROW;
128 extern void *__memset_chk (void *__dest, int __ch, size_t __len,
129 size_t __destlen) __THROW;
130 extern char *__strcpy_chk (char *__restrict __dest,
131 const char *__restrict __src,
132 size_t __destlen) __THROW;
133 extern char *__stpcpy_chk (char *__restrict __dest,
134 const char *__restrict __src,
135 size_t __destlen) __THROW;
136 extern char *__strncpy_chk (char *__restrict __dest,
137 const char *__restrict __src,
138 size_t __len, size_t __destlen) __THROW;
139 extern char *__strcat_chk (char *__restrict __dest,
140 const char *__restrict __src,
141 size_t __destlen) __THROW;
142 extern char *__strncat_chk (char *__restrict __dest,
143 const char *__restrict __src,
144 size_t __len, size_t __destlen) __THROW;