From 7a6cd620d08df24bc7c27e2a13017a1f63f004b2 Mon Sep 17 00:00:00 2001 From: ume Date: Sun, 15 May 2005 20:15:15 +0000 Subject: - The ai_addrlen of a struct addrinfo used to be a size_t, per RFC 2553. In XNS5.2, and subsequently in POSIX-2001 and RFC 3493, it was changed to a socklen_t. And, the n_net of a struct netent used to be an unsigned long integer. In XNS5, and subsequently in POSIX-2001, it was changed to an uint32_t. To accomodate for this while preserving ABI compatibility with the old interface, we need to prepend or append 32 bits of padding, depending on the (LP64) architecture's endianness. - Correct 1st argument of getnetbyaddr() to uint32_t on 32 bit arch. Stay as is on 64 bit arch for ABI backward compatibility for now. Reviewed by: das, peter MFC after: 2 weeks --- lib/libc/net/netdb_private.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'lib/libc/net/netdb_private.h') diff --git a/lib/libc/net/netdb_private.h b/lib/libc/net/netdb_private.h index e5a55ec..0b32780 100644 --- a/lib/libc/net/netdb_private.h +++ b/lib/libc/net/netdb_private.h @@ -28,14 +28,8 @@ #ifndef _NETDB_PRIVATE_H_ #define _NETDB_PRIVATE_H_ -#include #include /* XXX: for FILE */ -#ifndef _UINT32_T_DECLARED -typedef __uint32_t uint32_t; -#define _UINT32_T_DECLARED -#endif - #define _MAXALIASES 35 #define _MAXLINELEN 1024 #define _MAXADDRS 35 @@ -155,7 +149,7 @@ int gethostbyname_r(const char *, struct hostent *, struct hostent_data *); int gethostbyname2_r(const char *, int, struct hostent *, struct hostent_data *); int gethostent_r(struct hostent *, struct hostent_data *); -int getnetbyaddr_r(unsigned long addr, int af, struct netent *, +int getnetbyaddr_r(uint32_t addr, int af, struct netent *, struct netent_data *); int getnetbyname_r(const char *, struct netent *, struct netent_data *); int getnetent_r(struct netent *, struct netent_data *); -- cgit v1.1