#include <string.h>
#include <ctype.h>
+/* Experimentally off - libc_hidden_proto(memcpy) */
+/* Experimentally off - libc_hidden_proto(memset) */
+/* Experimentally off - libc_hidden_proto(strchr) */
+/* Experimentally off - libc_hidden_proto(strcpy) */
+/* Experimentally off - libc_hidden_proto(strlen) */
+libc_hidden_proto(sprintf)
+libc_hidden_proto(tolower)
/*
* WARNING: Don't even consider trying to compile this on a system where
}
tmp[i - 1] = '\0';
- if (__strlen (tmp) > size) {
+ if (strlen (tmp) > size) {
__set_errno (ENOSPC);
return (NULL);
}
- return __strcpy(dst, tmp);
+ return strcpy(dst, tmp);
}
* Copy the input (bytewise) array into a wordwise array.
* Find the longest run of 0x00's in src[] for :: shorthanding.
*/
- __memset(words, '\0', sizeof words);
+ memset(words, '\0', sizeof words);
for (i = 0; i < 16; i += 2)
words[i / 2] = (src[i] << 8) | src[i + 1];
best.base = -1;
cur.base = -1;
+ best.len = best.len; /* shutting up compiler warning */
+ cur.len = cur.len; /* shutting up compiler warning */
for (i = 0; i < 8; i++) {
if (words[i] == 0) {
if (cur.base == -1)
(best.len == 6 || (best.len == 5 && words[5] == 0xffff))) {
if (!inet_ntop4(src+12, tp, sizeof tmp - (tp - tmp)))
return (NULL);
- tp += __strlen(tp);
+ tp += strlen(tp);
break;
}
tp += sprintf(tp, "%x", words[i]);
__set_errno (ENOSPC);
return (NULL);
}
- return __strcpy(dst, tmp);
+ return strcpy(dst, tmp);
}
#endif /* __UCLIBC_HAS_IPV6__ */
}
if (octets < 4)
return (0);
- __memcpy(dst, tmp, 4);
+ memcpy(dst, tmp, 4);
return (1);
}
#ifdef __UCLIBC_HAS_IPV6__
/* We cannot use the macro version of tolower() or very bad
- * things happen when '*src++' gets evaluated multiple times.
- * So * undef it here so we get the function version of tolower
+ * things happen when '*src++' gets evaluated multiple times.
+ * So undef it here so we get the function version of tolower
* instead.
*/
#undef tolower
u_int val;
- tp = __memset(tmp, '\0', 16);
+ tp = memset(tmp, '\0', 16);
endp = tp + 16;
colonp = NULL;
/* Leading :: requires some special handling. */
while ((ch = tolower (*src++)) != '\0') {
const char *pch;
- pch = __strchr(xdigits, ch);
+ pch = strchr(xdigits, ch);
if (pch != NULL) {
val <<= 4;
val |= (pch - xdigits);
}
if (tp != endp)
return (0);
- __memcpy(dst, tmp, 16);
+ memcpy(dst, tmp, 16);
return (1);
}
* author:
* Paul Vixie, 1996.
*/
-const char attribute_hidden *
-__inet_ntop(int af, const void *src, char *dst, socklen_t size)
+libc_hidden_proto(inet_ntop)
+const char *
+inet_ntop(int af, const void *src, char *dst, socklen_t size)
{
switch (af) {
case AF_INET:
}
/* NOTREACHED */
}
-strong_alias(__inet_ntop,inet_ntop)
+libc_hidden_def(inet_ntop)
/* int
* author:
* Paul Vixie, 1996.
*/
-int attribute_hidden
-__inet_pton(int af, const char *src, void *dst)
+libc_hidden_proto(inet_pton)
+int
+inet_pton(int af, const char *src, void *dst)
{
switch (af) {
case AF_INET:
}
/* NOTREACHED */
}
-strong_alias(__inet_pton,inet_pton)
+libc_hidden_def(inet_pton)