This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: BUG - 1.3.n accept fails if NULL sockaddr * argument and other related stuff.
On Wed, Aug 01, 2001 at 12:02:44PM +0400, Borsenkow Andrej wrote:
>
> > >
> > > 1. socket.h does not include a type "socklen_t" which is
> > apparently defined
> > > on some Unix platforms.
> > >
>
> So what? You yourself say "on some Unix". I have seen the actual type in
> question (used in prototypes) being int, size_t, unsigned long. May be
> something else. Defining it as socklen_t adds virtually nothing to
> readablility or portability (portable programs should still check actual
> type to avoid prototype mismatch errors).
>
> Or do you say that socklen_t is defined in some standard? This is different
> matter.
Linux defines it as `int' as it's enforced by Linus. See the amusing
`NOTE' section in `man 2 accept':
Quoting Linus Torvalds: _Any_ sane library _must_
have "socklen_t" be the same size as int. Anything else
breaks any BSD socket layer stuff.
POSIX defines it as `int' which is correct. SUSv2 defines it as
"an unsigned opaque integral type of length of at least 32 bits."
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Developer mailto:cygwin@cygwin.com
Red Hat, Inc.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/