summaryrefslogtreecommitdiffstats
path: root/libc/inet/ether_addr.c
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2006-02-25 04:03:33 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2006-02-25 04:03:33 +0000
commitcb6a88484ce0b5ffba2fe98a40e2d51f4af92eb8 (patch)
tree520f8e8d113184cfa7954ebd274564b8c255fa9a /libc/inet/ether_addr.c
parente4461be66e2655058aef358b00050bc70ac72861 (diff)
downloaduClibc-alpine-cb6a88484ce0b5ffba2fe98a40e2d51f4af92eb8.tar.bz2
uClibc-alpine-cb6a88484ce0b5ffba2fe98a40e2d51f4af92eb8.tar.xz
Merge from trunk. Going pretty good so far. Kind of. Okay, not really.
Diffstat (limited to 'libc/inet/ether_addr.c')
-rw-r--r--libc/inet/ether_addr.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/libc/inet/ether_addr.c b/libc/inet/ether_addr.c
index 0a1e2aede..13414826e 100644
--- a/libc/inet/ether_addr.c
+++ b/libc/inet/ether_addr.c
@@ -23,7 +23,6 @@
* - initial uClibc port
*/
-
#define __FORCE_GLIBC
#include <features.h>
#include <ctype.h>
@@ -32,7 +31,18 @@
#include <netinet/ether.h>
#include <netinet/if_ether.h>
-struct ether_addr attribute_hidden *__ether_aton_r(const char *asc, struct ether_addr *addr)
+libc_hidden_proto(ether_aton_r)
+libc_hidden_proto(ether_ntoa_r)
+libc_hidden_proto(sprintf)
+#ifdef __UCLIBC_HAS_XLOCALE__
+libc_hidden_proto(__ctype_b_loc)
+libc_hidden_proto(__ctype_tolower_loc)
+#else
+libc_hidden_proto(__ctype_b)
+libc_hidden_proto(__ctype_tolower)
+#endif
+
+struct ether_addr *ether_aton_r(const char *asc, struct ether_addr *addr)
{
size_t cnt;
@@ -68,28 +78,28 @@ struct ether_addr attribute_hidden *__ether_aton_r(const char *asc, struct ether
return addr;
}
-strong_alias(__ether_aton_r,ether_aton_r)
+libc_hidden_def(ether_aton_r)
struct ether_addr *ether_aton(const char *asc)
{
static struct ether_addr result;
- return __ether_aton_r(asc, &result);
+ return ether_aton_r(asc, &result);
}
-char attribute_hidden *__ether_ntoa_r(const struct ether_addr *addr, char *buf)
+char *ether_ntoa_r(const struct ether_addr *addr, char *buf)
{
- __sprintf(buf, "%x:%x:%x:%x:%x:%x",
+ sprintf(buf, "%x:%x:%x:%x:%x:%x",
addr->ether_addr_octet[0], addr->ether_addr_octet[1],
addr->ether_addr_octet[2], addr->ether_addr_octet[3],
addr->ether_addr_octet[4], addr->ether_addr_octet[5]);
return buf;
}
-strong_alias(__ether_ntoa_r,ether_ntoa_r)
+libc_hidden_def(ether_ntoa_r)
char *ether_ntoa(const struct ether_addr *addr)
{
static char asc[18];
- return __ether_ntoa_r(addr, asc);
+ return ether_ntoa_r(addr, asc);
}