Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Date: Wed, 1 Aug 2001 10:40:42 +0200
From: Corinna Vinschen <cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: BUG - 1.3.n accept fails if NULL sockaddr * argument and other related stuff.
Message-ID: <20010801104042.F9574@cygbert.vinschen.de>
Mail-Followup-To: cygwin@cygwin.com
References: <20010801092435.B9574@cygbert.vinschen.de> <000c01c11a60$58576670$21c9ca95@mow.siemens.ru>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
In-Reply-To: <000c01c11a60$58576670$21c9ca95@mow.siemens.ru>; from Andrej.Borsenkow@mow.siemens.ru on Wed, Aug 01, 2001 at 12:02:44PM +0400

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/

