[CFR] correct type of addrinfo.ai_addrlen and netent.n_net
Peter Wemm
peter at wemm.org
Wed May 4 15:30:32 PDT 2005
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
More information about the freebsd-arch
mailing list