From owner-freebsd-standards@FreeBSD.ORG Mon May 2 11:01:59 2005 Return-Path: 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 6B2EB16A4D7 for ; Mon, 2 May 2005 11:01:59 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0F60643D4C for ; Mon, 2 May 2005 11:01:59 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j42B1wJ7030295 for ; Mon, 2 May 2005 11:01:58 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j42B1wef030289 for freebsd-standards@freebsd.org; Mon, 2 May 2005 11:01:58 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 2 May 2005 11:01:58 GMT Message-Id: <200505021101.j42B1wef030289@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-standards@FreeBSD.org Subject: Current problem reports assigned to you X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2005 11:01:59 -0000 Current FreeBSD problem reports Critical problems Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2001/03/05] bin/25542 standards /bin/sh: null char in quoted string p [2002/02/25] standards/35307standards standard include files are not standard c o [2002/12/13] kern/46239 standards posix semaphore implementation errors o [2003/04/21] standards/51209standards [PATCH] add a64l()/l64a/l64a_r functions p [2003/06/05] standards/52972standards /bin/sh arithmetic not POSIX compliant o [2003/07/12] standards/54410standards one-true-awk not POSIX compliant (no exte o [2004/01/01] standards/60772standards _Bool and bool should be unsigned o [2004/11/03] standards/73500standards 'set +o' in /bin/sh does not include unse o [2005/03/03] standards/78357standards getaddrinfo() doesn't appear to support A o [2005/03/09] standards/78650standards ttyname_r() is not standards compliant o [2005/03/16] standards/78907standards does not define pthread typ 11 problems total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2000/09/24] bin/21519 standards sys/dir.h should be deprecated some more o [2001/01/16] bin/24390 standards Replacing old dir-symlinks when using /bi s [2001/01/24] standards/24590standards timezone function not compatible witn Sin s [2001/06/18] kern/28260 standards UIO_MAXIOV needs to be made public p [2001/11/20] standards/32126standards getopt(3) not Unix-98 conformant o [2002/02/27] misc/35381 standards incorrect floating-point display of large s [2002/03/19] standards/36076standards Implementation of POSIX fuser command o [2002/06/14] standards/39256standards [v]snprintf aren't POSIX-conformant for s o [2002/07/09] kern/40378 standards stdlib.h gives needless warnings with -an p [2002/08/12] standards/41576standards POSIX compliance of ln(1) o [2002/10/23] standards/44425standards getcwd() succeeds even if current dir has o [2002/12/09] standards/46119standards Priority problems for SCHED_OTHER using p o [2003/07/24] standards/54809standards pcvt deficits o [2003/07/25] standards/54833standards more pcvt deficits o [2003/07/25] standards/54839standards pcvt deficits o [2003/07/31] standards/55112standards glob.h, glob_t's gl_pathc should be "size o [2003/09/05] standards/56476standards cd9660 unicode support simple hack o [2003/10/29] standards/58676standards grantpt(3) alters storage used by ptsname p [2003/12/26] standards/60597standards FreeBSD's /usr/include lacks of cpio.h s [2004/02/14] standards/62858standards malloc(0) not C99 compliant p [2004/02/21] standards/63173standards Patch to add getopt_long_only(3) to libc o [2004/03/29] kern/64875 standards [patch] add a system call: fdatasync() o [2004/05/07] standards/66357standards make POSIX conformance problem ('sh -e' & o [2004/05/11] standards/66531standards _gettemp uses a far smaller set of filena o [2004/08/22] standards/70813standards [PATCH] ls not Posix compliant o [2004/08/26] docs/70985 standards [patch] sh(1): incomplete documentation o o [2004/09/22] standards/72006standards floating point formating in non-C locales o [2005/03/20] standards/79055standards Add an IFS regression test for shells o [2005/03/20] standards/79056standards regex(3) regression tests o [2005/03/21] standards/79067standards /bin/sh should be more intelligent about 30 problems total. From owner-freebsd-standards@FreeBSD.ORG Tue May 3 14:13:05 2005 Return-Path: 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 4828F16A4CE for ; Tue, 3 May 2005 14:13:05 +0000 (GMT) Received: from kane.otenet.gr (kane.otenet.gr [195.170.0.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id A84AC43D8D for ; Tue, 3 May 2005 14:13:03 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-a040.otenet.gr [212.205.215.40]) j43EBJrr022621; Tue, 3 May 2005 17:11:21 +0300 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.13.3/8.13.3) with ESMTP id j43ECN4l001105; Tue, 3 May 2005 17:12:23 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.13.3/8.13.3/Submit) id j43ECKXV001101; Tue, 3 May 2005 17:12:20 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Tue, 3 May 2005 17:12:20 +0300 From: Giorgos Keramidas To: "M. Warner Losh" Message-ID: <20050503141220.GA925@gothmog.gr> References: <20050420155407.GA844@falcon.midgard.homeip.net> <84dead720504200910441b9108@mail.gmail.com> <20050420162332.GB52948@orion.daedalusnetworks.priv> <20050429.005317.69580336.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050429.005317.69580336.imp@bsdimp.com> cc: freebsd-standards@freebsd.org Subject: Re: Standard type for code pointers? X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2005 14:13:05 -0000 On 2005-04-29 00:53, "M. Warner Losh" wrote: > In message: <20050420162332.GB52948@orion.daedalusnetworks.priv> > Giorgos Keramidas writes: > : > Is 'register_t' guaranteed to be wide enough? > : > : AFAIK, no. Portable C code cannot assume that a function pointer is > : small enough to fit in a single machine register. Some obscure > : architecture may choose to represent function entry points with as > : many register as it needs. > > You mean like medium model (64k data, larger code) 8086 :-) Bingo! Memory models was precicely the thing I had in mind :-) From owner-freebsd-standards@FreeBSD.ORG Tue May 3 18:44:45 2005 Return-Path: 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 1B36016A4CE; Tue, 3 May 2005 18:44:45 +0000 (GMT) Received: from cheer.mahoroba.org (gw4.mahoroba.org [218.45.22.175]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9129E43D54; Tue, 3 May 2005 18:44:41 +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)j43IiK7v073557 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 4 May 2005 03:44:21 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Wed, 04 May 2005 03:44:20 +0900 Message-ID: From: Hajimu UMEMOTO To: arch@FreeBSD.org, standards@FreeBSD.org, current@FreeBSD.org User-Agent: 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 MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-2.0b5 (cheer.mahoroba.org [IPv6:3ffe:501:185b:8010::1]); Wed, 04 May 2005 03:44:21 +0900 (JST) X-Virus-Scanned: by amavisd-new X-Virus-Status: Clean X-Spam-Status: No, score=-5.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on cheer.mahoroba.org Subject: [CFR] correct type of addrinfo.ai_addrlen and netent.n_net X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2005 18:44:45 -0000 Hi, The ai_addrlen of a struct addrinfo 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. And, the n_net of a struct netent used to be an unsigned long integer. In XNS5, and subsequently in POSIX-2001, it was changed to an uint32_t. I made a patch to correct these: http://www.imasy.or.jp/~ume/FreeBSD/netdb.h-padding.diff To accomodate for this while preserving ABI compatibility with the old interface, we need to prepend or append 32 bits of padding, depending on the (LP64) architecture's endianness. I wish to delete these padding before 6.0-RELEASE. Please review it. Sincerely, -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/ From owner-freebsd-standards@FreeBSD.ORG Tue May 3 22:47:26 2005 Return-Path: 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 B099116A4CE; Tue, 3 May 2005 22:47:26 +0000 (GMT) Received: from VARK.MIT.EDU (VARK.MIT.EDU [18.95.3.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E28E43D5D; Tue, 3 May 2005 22:47:26 +0000 (GMT) (envelope-from das@FreeBSD.ORG) Received: from VARK.MIT.EDU (localhost [127.0.0.1]) by VARK.MIT.EDU (8.13.3/8.13.1) with ESMTP id j43Mi9A3016397; Tue, 3 May 2005 18:44:09 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.MIT.EDU (8.13.3/8.13.1/Submit) id j43Mi99l016396; Tue, 3 May 2005 18:44:09 -0400 (EDT) (envelope-from das@FreeBSD.ORG) Date: Tue, 3 May 2005 18:44:09 -0400 From: David Schultz To: Hajimu UMEMOTO Message-ID: <20050503224409.GA16252@VARK.MIT.EDU> Mail-Followup-To: Hajimu UMEMOTO , arch@FreeBSD.ORG, standards@FreeBSD.ORG References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: cc: arch@FreeBSD.ORG cc: standards@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.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2005 22:47:26 -0000 On Wed, May 04, 2005, Hajimu UMEMOTO wrote: > Hi, > > The ai_addrlen of a struct addrinfo 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. > And, the n_net of a struct netent used to be an unsigned long integer. > In XNS5, and subsequently in POSIX-2001, it was changed to an > uint32_t. > > I made a patch to correct these: > > http://www.imasy.or.jp/~ume/FreeBSD/netdb.h-padding.diff > > To accomodate for this while preserving ABI compatibility with the old > interface, we need to prepend or append 32 bits of padding, depending > on the (LP64) architecture's endianness. I wish to delete these > padding before 6.0-RELEASE. > > Please review it. I have a subset of this (along with some other changes for POSIX) in my tree---see the patch below. My patch only includes the part that can be done without breaking the ABI. (Actually, doesn't your patch *fix* the ABI with respect to FreeBSD 4.X? It just breaks it w.r.t. 5.X, I think.) Assuming that people are willing to accept the ABI breakage (and I'm not sure this is true), the patch looks reasonable. I have two minor comments: - You should use socklen_t instead of uint32_t, as appropriate. - It's probably better to use the machine/endian.h macros to test endianness instead of hard-coding every architecture. Index: netdb.h =================================================================== RCS file: /cvs/src/include/netdb.h,v retrieving revision 1.34 diff -u -r1.34 netdb.h --- netdb.h 14 Feb 2005 11:33:11 -0000 1.34 +++ netdb.h 21 Mar 2005 00:57:54 -0000 @@ -63,17 +63,19 @@ #include #include - -#ifndef _SIZE_T_DECLARED -typedef __size_t size_t; -#define _SIZE_T_DECLARED -#endif +#include +#include #ifndef _SOCKLEN_T_DECLARED typedef __socklen_t socklen_t; #define _SOCKLEN_T_DECLARED #endif +#ifndef _UINT32_T_DECLARED +typedef __uint32_t uint32_t; +#define _UINT32_T_DECLARED +#endif + #ifndef _PATH_HEQUIV # define _PATH_HEQUIV "/etc/hosts.equiv" #endif @@ -100,13 +102,19 @@ /* * Assumption here is that a network number - * fits in an unsigned long -- probably a poor one. + * fits in 32 bits -- probably a poor one, but required by POSIX. */ struct netent { char *n_name; /* official name of net */ char **n_aliases; /* alias list */ int n_addrtype; /* net address type */ - unsigned long n_net; /* network # */ +#if __LONG_BIT == 64 && _BYTE_ORDER == _BIG_ENDIAN + uint32_t __unused; /* ABI compat */ +#endif + uint32_t n_net; /* network # */ +#if __LONG_BIT == 64 && _BYTE_ORDER == _LITTLE_ENDIAN + uint32_t __unused; /* ABI compat */ +#endif }; struct servent { @@ -127,24 +135,32 @@ int ai_family; /* PF_xxx */ int ai_socktype; /* SOCK_xxx */ int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */ - size_t ai_addrlen; /* length of ai_addr */ + /* XXX ai_addrlen should have type socklen_t */ + __size_t ai_addrlen; /* length of ai_addr */ char *ai_canonname; /* canonical name for hostname */ struct sockaddr *ai_addr; /* binary address */ struct addrinfo *ai_next; /* next structure in linked list */ }; +/* Highest reserved port number. Keep in sync with netinet/in.h. */ +#define IPPORT_RESERVED 1024 + /* * Error return codes from gethostbyname() and gethostbyaddr() * (left in h_errno). */ +#if __BSD_VISIBLE #define NETDB_INTERNAL -1 /* see errno */ #define NETDB_SUCCESS 0 /* no problem */ +#endif #define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found */ #define TRY_AGAIN 2 /* Non-Authoritative Host not found, or SERVERFAIL */ #define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP */ #define NO_DATA 4 /* Valid name, no data record of requested type */ +#if __BSD_VISIBLE #define NO_ADDRESS NO_DATA /* no address, look for MX record */ +#endif /* * Error return codes from getaddrinfo() @@ -166,9 +182,14 @@ #define EAI_SERVICE 9 /* servname not supported for ai_socktype */ #define EAI_SOCKTYPE 10 /* ai_socktype not supported */ #define EAI_SYSTEM 11 /* system error returned in errno */ +#if __BSD_VISIBLE #define EAI_BADHINTS 12 #define EAI_PROTOCOL 13 -#define EAI_MAX 14 +#endif +#define EAI_OVERFLOW 14 /* argument buffer overflowed */ +#if __BSD_VISIBLE +#define EAI_MAX 15 +#endif /* * Flag values for getaddrinfo() @@ -177,23 +198,33 @@ #define AI_CANONNAME 0x00000002 /* fill ai_canonname */ #define AI_NUMERICHOST 0x00000004 /* prevent host name resolution */ #define AI_NUMERICSERV 0x00000008 /* prevent service name resolution */ + +#if __BSD_VISIBLE /* valid flags for addrinfo (not a standard def, apps should not use it) */ #define AI_MASK \ (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_NUMERICSERV | \ AI_ADDRCONFIG) +#endif #define AI_ALL 0x00000100 /* IPv6 and IPv4-mapped (with AI_V4MAPPED) */ +#if __BSD_VISIBLE #define AI_V4MAPPED_CFG 0x00000200 /* accept IPv4-mapped if kernel supports */ +#endif #define AI_ADDRCONFIG 0x00000400 /* only if any address is assigned */ #define AI_V4MAPPED 0x00000800 /* accept IPv4-mapped IPv6 address */ + +#if __BSD_VISIBLE /* special recommended flags for getipnodebyname */ #define AI_DEFAULT (AI_V4MAPPED_CFG | AI_ADDRCONFIG) +#endif +#if __BSD_VISIBLE /* * Constants for getnameinfo() */ #define NI_MAXHOST 1025 #define NI_MAXSERV 32 +#endif /* * Flag values for getnameinfo() @@ -203,72 +234,81 @@ #define NI_NAMEREQD 0x00000004 #define NI_NUMERICSERV 0x00000008 #define NI_DGRAM 0x00000010 -#if 1 /* obsolete */ +#if __BSD_VISIBLE /* obsolete */ #define NI_WITHSCOPEID 0x00000020 #endif +#if __BSD_VISIBLE /* * Scope delimit character */ #define SCOPE_DELIMITER '%' +#endif __BEGIN_DECLS void endhostent(void); void endnetent(void); -void endnetgrent(void); void endprotoent(void); void endservent(void); -void freehostent(struct hostent *); -struct hostent *gethostbyaddr(const char *, int, int); +struct hostent *gethostbyaddr(const void *, int, int); struct hostent *gethostbyname(const char *); -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 *); struct netent *getnetbyaddr(unsigned long, int); struct netent *getnetbyname(const char *); struct netent *getnetent(void); -int getnetgrent(char **, char **, char **); struct protoent *getprotobyname(const char *); struct protoent *getprotobynumber(int); struct protoent *getprotoent(void); struct servent *getservbyname(const char *, const char *); struct servent *getservbyport(int, const char *); struct servent *getservent(void); -void herror(const char *); -__const char *hstrerror(int); -int innetgr(const char *, const char *, const char *, const char *); + +/* XXX Should replace __size_t with socklen_t below */ void sethostent(int); /* void sethostfile(const char *); */ void setnetent(int); void setprotoent(int); -int getaddrinfo(const char *, const char *, - const struct addrinfo *, struct addrinfo **); -int getnameinfo(const struct sockaddr *, socklen_t, char *, - size_t, char *, size_t, int); +int getaddrinfo(const char * __restrict, const char * __restrict, + const struct addrinfo * __restrict, + struct addrinfo ** __restrict); +int getnameinfo(const struct sockaddr * __restrict, socklen_t, + char * __restrict, __size_t, char * __restrict, + __size_t, int); void freeaddrinfo(struct addrinfo *); const char *gai_strerror(int); -void setnetgrent(const char *); void setservent(int); +#if __BSD_VISIBLE +void endnetgrent(void); +void freehostent(struct hostent *); +struct hostent *gethostbyname2(const char *, int); +struct hostent *getipnodebyaddr(const void *, __size_t, int, int *); +struct hostent *getipnodebyname(const char *, int, int, int *); +int getnetgrent(char **, char **, char **); +void herror(const char *); +__const char *hstrerror(int); +int innetgr(const char *, const char *, const char *, const char *); +void setnetgrent(const char *); +#endif + /* * PRIVATE functions specific to the FreeBSD implementation */ /* DO NOT USE THESE, THEY ARE SUBJECT TO CHANGE AND ARE NOT PORTABLE!!! */ int * __h_error(void); -void _sethosthtent(int); -void _endhosthtent(void); -void _sethostdnsent(int); -void _endhostdnsent(void); -void _setnethtent(int); -void _endnethtent(void); -void _setnetdnsent(int); -void _endnetdnsent(void); -struct hostent * _gethostbynisname(const char *, int); -struct hostent * _gethostbynisaddr(const char *, int, int); -void _map_v4v6_address(const char *, char *); -void _map_v4v6_hostent(struct hostent *, char **, char **); +void __sethosthtent(int); +void __endhosthtent(void); +void __sethostdnsent(int); +void __endhostdnsent(void); +void __setnethtent(int); +void __endnethtent(void); +void __setnetdnsent(int); +void __endnetdnsent(void); +struct hostent * __gethostbynisname(const char *, int); +struct hostent * __gethostbynisaddr(const char *, int, int); +void __map_v4v6_address(const char *, char *); +void __map_v4v6_hostent(struct hostent *, char **, char **); __END_DECLS #endif /* !_NETDB_H_ */ From owner-freebsd-standards@FreeBSD.ORG Wed May 4 22:30:32 2005 Return-Path: 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 834EB16A4CE; Wed, 4 May 2005 22:30:32 +0000 (GMT) Received: from canning.wemm.org (canning.wemm.org [192.203.228.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 53D5143D6E; Wed, 4 May 2005 22:30:32 +0000 (GMT) (envelope-from peter@wemm.org) Received: from fw.wemm.org (canning.wemm.org [192.203.228.65]) by canning.wemm.org (Postfix) with ESMTP id D434A2A8DA; Wed, 4 May 2005 15:29:38 -0700 (PDT) (envelope-from peter@wemm.org) Received: from overcee.wemm.org (overcee.wemm.org [10.0.0.3]) by fw.wemm.org (Postfix) with ESMTP id 71832E2B3; Wed, 4 May 2005 15:29:38 -0700 (PDT) (envelope-from peter@wemm.org) Received: from overcee.wemm.org (localhost [127.0.0.1]) by overcee.wemm.org (8.13.3/8.13.1) with ESMTP id j44MTbBm055338; Wed, 4 May 2005 15:29:37 -0700 (PDT) (envelope-from peter@wemm.org) Received: from localhost (localhost [[UNIX: localhost]]) by overcee.wemm.org (8.13.3/8.13.1/Submit) id j44MTaBg055337; Wed, 4 May 2005 15:29:36 -0700 (PDT) (envelope-from peter@wemm.org) X-Authentication-Warning: overcee.wemm.org: peter set sender to peter@wemm.org using -f From: Peter Wemm To: freebsd-arch@freebsd.org Date: Wed, 4 May 2005 15:29:36 -0700 User-Agent: KMail/1.8 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200505041529.36826.peter@wemm.org> cc: arch@freebsd.org cc: standards@freebsd.org cc: current@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.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2005 22:30:32 -0000 On Tuesday 03 May 2005 11:44 am, Hajimu UMEMOTO wrote: > To accomodate for this while preserving ABI compatibility with the > old interface, we need to prepend or append 32 bits of padding, > depending on the (LP64) architecture's endianness. I wish to delete > these padding before 6.0-RELEASE. Like David Schultz said, it would be better to use the machine/endian.h macros to set the padding position. As far as removing the padding goes, it makes little difference whether you break it now or later. Doing it now will be painful. Doing it before 6.0-REL will be just as painful. Not only is this encoded in libc.so.6, but all applications and shared libraries that have exposure to this also know it. For example, if libc.so.6 has the padding and libc.so.5 does not, and if we provide libfoo.so.1 on both 5.x and 6.x, *and* if libfoo.so.1 knows the layout of netdb.h, then it has to be bumped too. This includes all ports with shared libraries that use this #include. Otherwise running apps linked with libc.so.5 will get memory corruption. I think it would be better to leave the padding, again conditional on machine/endian.h. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com "All of this is for nothing if we don't go to the stars" - JMS/B5