[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Optionally make compat socklen_t default to int in bootstrap?
On Sun, Apr 17, 2016 at 07:23:43PM +0200, Joerg Sonnenberger wrote:
> > > #ifndef HAVE_SOCKLEN_T
> > > typedef unsigned int socklen_t;
> > > #endif
> > >
> > > part of pkgtools/libnbcompat/files/nbcompat/netdb.h
> > >
> > > use "int" instead of "unsigned int" when make gets OPSYS=SunOS.
> > IME, "int" is the proper type on nearly all platforms that don't
> > provide a typedef.
> That never was my experience and given how long this has been in the
> tree, history seems to agree with me.
Historically it was always int. When people started cleaning up int
vs. size_t, a couple OSes started using size_t for socket lengths, and
then code broke, and posix came up with socklen_t. So most of the time
anything that isn't historical will have socklen_t, and anything
that's historical should use int.
But whatever, that was twenty years ago. And the right thing to do is
probe it in the configure script.
David A. Holland
Main Index |
Thread Index |