From owner-freebsd-current@FreeBSD.ORG Wed Jun 20 12:40:45 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3445716A421; Wed, 20 Jun 2007 12:40:45 +0000 (UTC) (envelope-from stefan@fafoe.narf.at) Received: from viefep17-int.chello.at (viefep18-int.chello.at [213.46.255.22]) by mx1.freebsd.org (Postfix) with ESMTP id C6F2A13C44B; Wed, 20 Jun 2007 12:40:43 +0000 (UTC) (envelope-from stefan@fafoe.narf.at) Received: from lizard.fafoe.narf.at ([213.47.85.26]) by viefep17-int.chello.at (InterMail vM.7.08.02.00 201-2186-121-20061213) with ESMTP id <20070620124040.HYBA8377.viefep17-int.chello.at@lizard.fafoe.narf.at>; Wed, 20 Jun 2007 14:40:40 +0200 Received: by lizard.fafoe.narf.at (Postfix, from userid 1001) id 96ACCB97A; Wed, 20 Jun 2007 14:40:40 +0200 (CEST) Date: Wed, 20 Jun 2007 14:40:40 +0200 From: Stefan Farfeleder To: Daniel Eischen Message-ID: <20070620124040.GC929@lizard.fafoe.narf.at> Mail-Followup-To: Daniel Eischen , current@freebsd.org References: <46765CB9.9020105@incunabulum.net> <4676C30E.7040300@incunabulum.net> <4676C952.5000607@incunabulum.net> <4676D168.3050502@incunabulum.net> <4678529A.3080308@incunabulum.net> <20070620110702.GB929@lizard.fafoe.narf.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.15 (2007-04-06) Cc: current@freebsd.org Subject: Re: socklen_t (Re: Multicast problems [PATCH]) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2007 12:40:45 -0000 On Wed, Jun 20, 2007 at 08:34:46AM -0400, Daniel Eischen wrote: > On Wed, 20 Jun 2007, Stefan Farfeleder wrote: > > > On Tue, Jun 19, 2007 at 06:36:39PM -0400, Daniel Eischen wrote: > > > >> POSIX states that: > >> > >> o The header shall define the type socklen_t, > >> which is an integer type of width of at least 32 bits; see > >> APPLICATION USAGE. > >> > >> and goes on to state: > >> > >> o The header shall define the unsigned integer > >> type sa_family_t. > >> > >> This seems to imply that our socklen_t should not be an unsigned > >> integer (uint32_t), but a signed integer. In APPLICATION USAGE, > >> POSIX states: > > > > I don't understand how you come to that conclusion. Why does not > > mentioning whether socklen_t is signed or unsigned imply it should be > > signed? > > Because it explicitly says unsigned for sa_family_t and does not > say unsigned for socklen_t. To me, "integer" means a C (signed) > integer. It doesn't say signed or unsigned for socklen_t because both are allowed. Eg. regoff_t in is explicitly defined as a "signed integer type". I'm sure there are more, that's just the first one I found. Stefan