summaryrefslogtreecommitdiffstats
path: root/include/netdb.h
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2005-06-03 03:32:06 +0000
committerume <ume@FreeBSD.org>2005-06-03 03:32:06 +0000
commit0d8a6fcf732984f217c6997539424b40833a93b4 (patch)
tree702e58890db0bbb3857a75fc83bf46e91d817d88 /include/netdb.h
parent1d986ea68c6db47631382924459e834b5e125380 (diff)
downloadFreeBSD-src-0d8a6fcf732984f217c6997539424b40833a93b4.zip
FreeBSD-src-0d8a6fcf732984f217c6997539424b40833a93b4.tar.gz
- Remove padding for ABI compatibility of n_net member from struct
netent. - Change 1st argument of getnetbyaddr() to an uint32_t on 64 bit arch as well to confirm to POSIX-2001. These changes break ABI compatibility on 64 bit arch. There is similar padding issue for ai_addrlen of struct addrinfo. However, it is leaved as is for now. Discussed on: arch@, standards@ and current@ X-MFC after: never
Diffstat (limited to 'include/netdb.h')
-rw-r--r--include/netdb.h21
1 files changed, 0 insertions, 21 deletions
diff --git a/include/netdb.h b/include/netdb.h
index 8c57ebf..f003c25 100644
--- a/include/netdb.h
+++ b/include/netdb.h
@@ -105,28 +105,11 @@ struct hostent {
#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 {
@@ -262,11 +245,7 @@ struct hostent *gethostbyname2(const char *, int);
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 **);
OpenPOWER on IntegriCloud