Deleted Added
full compact
58c58
< * $FreeBSD: head/include/netdb.h 145602 2005-04-27 19:12:57Z ume $
---
> * $FreeBSD: head/include/netdb.h 146244 2005-05-15 20:15:15Z ume $
65a66,67
> #include <machine/_limits.h>
> #include <machine/endian.h>
76a79,83
> #ifndef _UINT32_T_DECLARED
> typedef __uint32_t uint32_t;
> #define _UINT32_T_DECLARED
> #endif
>
102,103c109,117
< * Assumption here is that a network number
< * fits in an unsigned long -- probably a poor one.
---
> * Note: n_net 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 binary compatibility with
> * the old interface, we prepend or append 32 bits of padding,
> * depending on the (LP64) architecture's endianness.
> *
> * This should be deleted the next time the libc major number is
> * incremented.
109c123,129
< unsigned long n_net; /* network # */
---
> #if __LONG_BIT == 64 && _BYTE_ORDER == _BIG_ENDIAN
> uint32_t __n_pad0; /* ABI compatibility */
> #endif
> uint32_t n_net; /* network # */
> #if __LONG_BIT == 64 && _BYTE_ORDER == _LITTLE_ENDIAN
> uint32_t __n_pad0; /* ABI compatibility */
> #endif
124a145,155
> /*
> * Note: ai_addrlen 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.
> * To accomodate for this while preserving binary compatibility with the
> * old interface, we prepend or append 32 bits of padding, depending on
> * the (LP64) architecture's endianness.
> *
> * This should be deleted the next time the libc major number is
> * incremented.
> */
130c161,167
< size_t ai_addrlen; /* length of ai_addr */
---
> #if __LONG_BIT == 64 && _BYTE_ORDER == _BIG_ENDIAN
> uint32_t __ai_pad0; /* ABI compatibility */
> #endif
> socklen_t ai_addrlen; /* length of ai_addr */
> #if __LONG_BIT == 64 && _BYTE_ORDER == _LITTLE_ENDIAN
> uint32_t __ai_pad0; /* ABI compatibility */
> #endif
228c265,269
< struct netent *getnetbyaddr(unsigned long, int);
---
> #if __LONG_BIT == 64
> struct netent *getnetbyaddr(unsigned long, int); /* ABI compatibility */
> #else
> struct netent *getnetbyaddr(uint32_t, int);
> #endif