Re: [CFR] correct type of addrinfo.ai_addrlen and netent.n_net

From: Peter Wemm <peter_at_wemm.org>
Date: Wed, 4 May 2005 15:29:36 -0700
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_at_wemm.org; peter_at_FreeBSD.org; peter_at_yahoo-inc.com
"All of this is for nothing if we don't go to the stars" - JMS/B5
Received on Wed May 04 2005 - 20:30:32 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:34 UTC