diff options
author | Daniel Stenberg <daniel@haxx.se> | 2013-02-17 17:13:39 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2013-02-17 17:44:02 +0100 |
commit | cf7ad9758dd7927595cb9751ba8173e06fc33cad (patch) | |
tree | d62a9428b21c5d629c66a879ea2849cb2b4f6ee4 /inet_ntop.c | |
parent | ee9a1c2457c3238ee5cdae90fe18440d44377adc (diff) | |
download | c-ares-cf7ad9758dd7927595cb9751ba8173e06fc33cad.tar.gz c-ares-cf7ad9758dd7927595cb9751ba8173e06fc33cad.tar.bz2 c-ares-cf7ad9758dd7927595cb9751ba8173e06fc33cad.zip |
ares_inet_pton/ntop: cleanup
Make sure that the symbols are always exported and present in c-ares.
Make the headers prefixed with 'ares'.
Removed the inet_ntop.h version as it no longer features any content.
Diffstat (limited to 'inet_ntop.c')
-rw-r--r-- | inet_ntop.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/inet_ntop.c b/inet_ntop.c index ea1ebb8..77fe4a6 100644 --- a/inet_ntop.c +++ b/inet_ntop.c @@ -34,8 +34,6 @@ #include "ares.h" #include "ares_ipv6.h" -#include "inet_ntop.h" - #ifndef HAVE_INET_NTOP @@ -61,7 +59,7 @@ static const char *inet_ntop6(const unsigned char *src, char *dst, size_t size); * Paul Vixie, 1996. */ const char * -ares_inet_ntop(int af, const void *src, char *dst, size_t size) +ares_inet_ntop(int af, const void *src, char *dst, socklen_t size) { switch (af) { case AF_INET: @@ -197,4 +195,11 @@ inet_ntop6(const unsigned char *src, char *dst, size_t size) strcpy(dst, tmp); return (dst); } -#endif +#else /* HAVE_INET_NTOP */ + +const char *ares_inet_ntop(int af, const void *src, char *dst, socklen_t size) +{ + /* just relay this to the underlying function */ + return inet_ntop(af, src, dst, size); +} +#endif /* HAVE_INET_NTOP */ |