Date: Wed, 27 Jul 2005 19:49:32 GMT From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 81068 for review Message-ID: <200507271949.j6RJnWdw071511@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=81068 Change 81068 by peter@peter_overcee on 2005/07/27 19:48:59 Revert another gratuitous ABI change Affected files ... .. //depot/projects/hammer/include/netdb.h#14 edit Differences ... ==== //depot/projects/hammer/include/netdb.h#14 (text+ko) ==== @@ -105,11 +105,28 @@ #define h_addr h_addr_list[0] /* address, for backward compatibility */ }; +/* + * 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. + */ struct netent { char *n_name; /* official name of net */ char **n_aliases; /* alias list */ int n_addrtype; /* net address type */ +#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 }; struct servent { @@ -245,7 +262,11 @@ struct hostent *gethostent(void); struct hostent *getipnodebyaddr(const void *, size_t, int, int *); struct hostent *getipnodebyname(const char *, int, int, int *); +#if __LONG_BIT == 64 +struct netent *getnetbyaddr(unsigned long, int); /* ABI compatibility */ +#else struct netent *getnetbyaddr(uint32_t, int); +#endif struct netent *getnetbyname(const char *); struct netent *getnetent(void); int getnetgrent(char **, char **, char **);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200507271949.j6RJnWdw071511>