summaryrefslogtreecommitdiffstats
path: root/lib/libc
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 /lib/libc
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 'lib/libc')
-rw-r--r--lib/libc/net/getnetbydns.c6
-rw-r--r--lib/libc/net/getnetbyht.c3
-rw-r--r--lib/libc/net/getnetbynis.c3
-rw-r--r--lib/libc/net/getnetnamadr.c6
4 files changed, 1 insertions, 17 deletions
diff --git a/lib/libc/net/getnetbydns.c b/lib/libc/net/getnetbydns.c
index 5eca268..7dbb725 100644
--- a/lib/libc/net/getnetbydns.c
+++ b/lib/libc/net/getnetbydns.c
@@ -259,9 +259,6 @@ getnetanswer(querybuf *answer, int anslen, int net_i, struct netent *ne,
break;
}
ne->n_aliases++;
-#if __LONG_BIT == 64
- ne->__n_pad0 = 0; /* ABI compatibility */
-#endif
return 0;
}
h_errno = TRY_AGAIN;
@@ -334,9 +331,6 @@ _dns_getnetbyaddr(void *rval, void *cb_data, va_list ap)
while ((net & 0xff) == 0 && net != 0)
net >>= 8;
ne->n_net = net;
-#if __LONG_BIT == 64
- ne->__n_pad0 = 0; /* ABI compatibility */
-#endif
return NS_SUCCESS;
}
return NS_NOTFOUND;
diff --git a/lib/libc/net/getnetbyht.c b/lib/libc/net/getnetbyht.c
index f4dcd98..4696b1a 100644
--- a/lib/libc/net/getnetbyht.c
+++ b/lib/libc/net/getnetbyht.c
@@ -122,9 +122,6 @@ again:
if (p != NULL)
*p++ = '\0';
ne->n_net = inet_network(cp);
-#if __LONG_BIT == 64
- ne->__n_pad0 = 0; /* ABI compatibility */
-#endif
ne->n_addrtype = AF_INET;
q = ne->n_aliases = ned->net_aliases;
if (p != NULL) {
diff --git a/lib/libc/net/getnetbynis.c b/lib/libc/net/getnetbynis.c
index 70785ac..200e7a4 100644
--- a/lib/libc/net/getnetbynis.c
+++ b/lib/libc/net/getnetbynis.c
@@ -99,9 +99,6 @@ _getnetbynis(const char *name, char *map, int af, struct netent *ne,
cp++;
ne->n_net = inet_network(cp);
-#if __LONG_BIT == 64
- ne->__n_pad0 = 0; /* ABI compatibility */
-#endif
ne->n_addrtype = AF_INET;
q = ne->n_aliases = ned->net_aliases;
diff --git a/lib/libc/net/getnetnamadr.c b/lib/libc/net/getnetnamadr.c
index eb8c9ae..ef982bc 100644
--- a/lib/libc/net/getnetnamadr.c
+++ b/lib/libc/net/getnetnamadr.c
@@ -165,17 +165,13 @@ getnetbyname(const char *name)
}
struct netent *
-#if __LONG_BIT == 64
-getnetbyaddr(u_long addr, int af) /* ABI compatibility */
-#else
getnetbyaddr(uint32_t addr, int af)
-#endif
{
struct netdata *nd;
if ((nd = __netdata_init()) == NULL)
return NULL;
- if (getnetbyaddr_r((uint32_t)addr, af, &nd->net, &nd->data) != 0)
+ if (getnetbyaddr_r(addr, af, &nd->net, &nd->data) != 0)
return NULL;
return &nd->net;
}
OpenPOWER on IntegriCloud