summaryrefslogtreecommitdiff
path: root/resolv
diff options
context:
space:
mode:
Diffstat (limited to 'resolv')
-rw-r--r--resolv/inet_addr.c13
-rw-r--r--resolv/netdb.h6
2 files changed, 11 insertions, 8 deletions
diff --git a/resolv/inet_addr.c b/resolv/inet_addr.c
index 60f0cbe3b4..48373b2060 100644
--- a/resolv/inet_addr.c
+++ b/resolv/inet_addr.c
@@ -74,13 +74,13 @@ static char rcsid[] = "$Id$";
* Ascii internet address interpretation routine.
* The value returned is in network order.
*/
-u_int32_t
+in_addr_t
inet_addr(cp)
register const char *cp;
{
struct in_addr val;
- if (inet_aton(cp, &val))
+ if (__inet_aton(cp, &val))
return (val.s_addr);
return (INADDR_NONE);
}
@@ -92,13 +92,13 @@ inet_addr(cp)
* This replaces inet_addr, the return value from which
* cannot distinguish between failure and a local broadcast address.
*/
-int
-inet_aton(cp, addr)
+in_addr_t
+__inet_aton(cp, addr)
const char *cp;
struct in_addr *addr;
{
- static const u_int32_t max[4] = { 0xffffffff, 0xffffff, 0xffff, 0xff };
- register u_int32_t val; /* changed from u_long --david */
+ static const in_addr_t max[4] = { 0xffffffff, 0xffffff, 0xffff, 0xff };
+ register in_addr_t val;
#ifndef _LIBC
register int base;
#endif
@@ -207,3 +207,4 @@ ret_0:
#endif
return (0);
}
+weak_alias (__inet_aton, inet_aton)
diff --git a/resolv/netdb.h b/resolv/netdb.h
index 50420c3e44..1f96351e36 100644
--- a/resolv/netdb.h
+++ b/resolv/netdb.h
@@ -131,10 +131,12 @@ extern struct hostent *gethostbyaddr (__const char *__addr, size_t __len,
/* Return entry from host data base for host with NAME. */
extern struct hostent *gethostbyname (__const char *__name) __THROW;
+#ifdef __USE_MISC
/* Return entry from host data base for host with NAME. AF must be
set to the address type which is `AF_INET' for IPv4 or `AF_INET6'
for IPv6. */
extern struct hostent *gethostbyname2 (__const char *__name, int __af) __THROW;
+#endif
#ifdef __USE_UNIX98
/* Return entry from host data base which address match ADDR with
@@ -343,11 +345,11 @@ extern int getnetgrent (char **__restrict __hostp,
char **__restrict __userp,
char **__restrict __domainp) __THROW;
+#ifdef __USE_MISC
/* Test whether NETGROUP contains the triple (HOST,USER,DOMAIN). */
extern int innetgr (__const char *__netgroup, __const char *__host,
__const char *__user, __const char *domain) __THROW;
-#ifdef __USE_MISC
/* Reentrant version of `getnetgrent' where result is placed in BUFFER. */
extern int getnetgrent_r (char **__restrict __hostp,
char **__restrict __userp,
@@ -428,7 +430,7 @@ struct addrinfo
int ai_family; /* Protocol family for socket. */
int ai_socktype; /* Socket type. */
int ai_protocol; /* Protocol for socket. */
- int ai_addrlen; /* Length of socket address. */
+ socklen_t ai_addrlen; /* Length of socket address. */
struct sockaddr *ai_addr; /* Socket address for socket. */
char *ai_canonname; /* Canonical name for service location. */
struct addrinfo *ai_next; /* Pointer to next in list. */