From owner-freebsd-standards@FreeBSD.ORG Wed Jun 1 12:44:50 2005 Return-Path: X-Original-To: standards@freebsd.org Delivered-To: freebsd-standards@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7AB2F16A41C; Wed, 1 Jun 2005 12:44:50 +0000 (GMT) (envelope-from ume@mahoroba.org) Received: from cheer.mahoroba.org (gw4.mahoroba.org [218.45.22.175]) by mx1.FreeBSD.org (Postfix) with ESMTP id E1EF643D1F; Wed, 1 Jun 2005 12:44:49 +0000 (GMT) (envelope-from ume@mahoroba.org) Received: from lyrics.mahoroba.org (ume@lyrics.mahoroba.org [IPv6:3ffe:501:185b:8010:280:88ff:fe03:4841]) (user=ume mech=CRAM-MD5 bits=0) by cheer.mahoroba.org (8.13.3/8.13.3) with ESMTP/inet6 id j51Ci5BY055893 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 1 Jun 2005 21:44:10 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Wed, 01 Jun 2005 21:44:03 +0900 Message-ID: From: Hajimu UMEMOTO To: freebsd-arch@freebsd.org, standards@freebsd.org, current@freebsd.org In-Reply-To: References: <20050531.075329.118637972.imp@bsdimp.com> <20050531.084832.20036038.imp@bsdimp.com> <86fyw32yqm.fsf@xps.des.no> <86k6lfbafu.fsf@xps.des.no> User-Agent: xcite1.38> Wanderlust/2.15.1 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 Emacs/22.0.50 (i386-unknown-freebsd5.4) MULE/5.0 (SAKAKI) X-Operating-System: FreeBSD 5.4-STABLE X-PGP-Key: http://www.imasy.or.jp/~ume/publickey.asc X-PGP-Fingerprint: 1F00 0B9E 2164 70FC 6DC5 BF5F 04E9 F086 BF90 71FE Organization: Internet Mutual Aid Society, YOKOHAMA X-PGP-Key: http://www.imasy.or.jp/~ume/publickey.asc X-PGP-Fingerprint: 1F00 0B9E 2164 70FC 6DC5 BF5F 04E9 F086 BF90 71FE MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/mixed; boundary="Multipart_Wed_Jun__1_21:44:03_2005-1" X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-2.0b5 (cheer.mahoroba.org [IPv6:3ffe:501:185b:8010::1]); Wed, 01 Jun 2005 21:44:12 +0900 (JST) X-Virus-Scanned: by amavisd-new X-Virus-Status: Clean X-Spam-Status: No, score=-5.5 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.0.3 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on cheer.mahoroba.org Cc: nectar@freebsd.org Subject: Re: [CFR] correct type of addrinfo.ai_addrlen and netent.n_net X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jun 2005 12:44:50 -0000 --Multipart_Wed_Jun__1_21:44:03_2005-1 Content-Type: text/plain; charset=US-ASCII Hi, >>>>> On Wed, 01 Jun 2005 03:00:10 +0900 >>>>> Hajimu UMEMOTO said: ume> In anyway, there is one more issue in my patch. We cannot correct 1st ume> argument of getnetbyaddr(3) without breaking ABI compatibility. ume> Fortunately, getnetbyaddr(3) is not refered else where in our ume> libraries. So, I'll fix getnetbyaddr(3). I've attached the patch to correct 1st argument of getnetbyaddr(3) in this mail. It is subset of my previous patch. Since it breaks ABI compatibility of getnetbyaddr(3), I think it is better to correct n_net member of struct netent, too. Since there is objection, the patch leaves struct addrinfo as is. So, it doesn't need to bump any shlib major. Is it okay? Sincerely, --Multipart_Wed_Jun__1_21:44:03_2005-1 Content-Type: text/x-patch; charset=US-ASCII Content-Disposition: attachment; filename="netdb.h-fix-getnetbyadr.diff" Content-Transfer-Encoding: 7bit Index: include/netdb.h diff -u include/netdb.h.orig include/netdb.h --- include/netdb.h.orig Sat May 28 01:20:40 2005 +++ include/netdb.h Sat May 28 01:31:52 2005 @@ -105,28 +103,11 @@ #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 +226,7 @@ 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 **); Index: lib/libc/net/getnetbydns.c diff -u -p lib/libc/net/getnetbydns.c.orig lib/libc/net/getnetbydns.c --- lib/libc/net/getnetbydns.c.orig Sat May 28 01:24:33 2005 +++ lib/libc/net/getnetbydns.c Sat May 28 01:36:52 2005 @@ -259,9 +259,6 @@ getnetanswer(querybuf *answer, int ansle 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_d 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; Index: lib/libc/net/getnetbyht.c diff -u -p lib/libc/net/getnetbyht.c.orig lib/libc/net/getnetbyht.c --- lib/libc/net/getnetbyht.c.orig Sat May 28 01:24:33 2005 +++ lib/libc/net/getnetbyht.c Sat May 28 01:37:13 2005 @@ -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) { Index: lib/libc/net/getnetbynis.c diff -u -p lib/libc/net/getnetbynis.c.orig lib/libc/net/getnetbynis.c --- lib/libc/net/getnetbynis.c.orig Sat May 28 01:24:33 2005 +++ lib/libc/net/getnetbynis.c Sat May 28 01:37:35 2005 @@ -99,9 +99,6 @@ _getnetbynis(const char *name, char *map 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; Index: lib/libc/net/getnetnamadr.c diff -u -p lib/libc/net/getnetnamadr.c.orig lib/libc/net/getnetnamadr.c --- lib/libc/net/getnetnamadr.c.orig Sat May 28 01:35:00 2005 +++ lib/libc/net/getnetnamadr.c Sat May 28 01:35:32 2005 @@ -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; } --Multipart_Wed_Jun__1_21:44:03_2005-1 Content-Type: text/plain; charset=US-ASCII -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/ --Multipart_Wed_Jun__1_21:44:03_2005-1--