From owner-freebsd-bugs@FreeBSD.ORG Wed Nov 28 05:21:05 2012 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C9AD54C1 for ; Wed, 28 Nov 2012 05:21:05 +0000 (UTC) (envelope-from sustrik@250bpm.com) Received: from mail.moloch.sk (chrocht.moloch.sk [62.176.169.44]) by mx1.freebsd.org (Postfix) with ESMTP id 82A7D8FC19 for ; Wed, 28 Nov 2012 05:21:04 +0000 (UTC) Received: from [192.168.1.134] (188-167-109-79.dynamic.chello.sk [188.167.109.79]) by mail.moloch.sk (Postfix) with ESMTPSA id 818A918050CC; Wed, 28 Nov 2012 06:21:02 +0100 (CET) Message-ID: <50B59F3D.5030102@250bpm.com> Date: Wed, 28 Nov 2012 06:21:01 +0100 From: Martin Sustrik User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111109 Thunderbird/3.1.16 MIME-Version: 1.0 To: Bruce Evans Subject: Re: Possible non-conformance to POSIX References: <50B53938.2010601@250bpm.com> <20121128092318.U1509@besplex.bde.org> In-Reply-To: <20121128092318.U1509@besplex.bde.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-bugs@FreeBSD.org X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Nov 2012 05:21:05 -0000 On 27/11/12 23:39, Bruce Evans wrote: >> #include >> INADDR_ANY; >> >> The above results in 'u_int32_t undefined' error, which it shouldn't >> according to POSIX. > > is careful to only declare uint32_t, but then it is > broken and uses u_int32_t for INADDR_ANY and INADDR_BROADCAST. > u_int32_t is also misused extensively in the definitions of INADDR_* > and IN_* under __BSD_VISIBLE. INADDR_ANY is broken even if __BSD_VISIBLE > is nonzero (the default), because the u_int32_t pollution is not > automatically supplied with __BSD_VISIBLE. It takes including > (with __BSD_VISIBLE) to get it. Yes. I figured out that including solves the problem. I was just pointing out the bug. If there's interest I can send a patch for INADDR_ANY and INADDR_BROADCAST. Martin