From owner-freebsd-stable@FreeBSD.ORG Sun Aug 31 19:47:21 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 35A9116A4BF for ; Sun, 31 Aug 2003 19:47:21 -0700 (PDT) Received: from smtp0.adl1.internode.on.net (smtp0.adl1.internode.on.net [203.16.214.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 926D543FE1 for ; Sun, 31 Aug 2003 19:47:19 -0700 (PDT) (envelope-from malcolm.kay@internode.on.net) Received: from beta.home (ppp104-131.lns1.adl1.internode.on.net [150.101.104.131])h812lDB1078801; Mon, 1 Sep 2003 12:17:14 +0930 (CST) Content-Type: text/plain; charset="iso-8859-1" From: Malcolm Kay Organization: At home To: Garrett Wollman , troy@twisted.net Date: Mon, 1 Sep 2003 12:17:13 +0930 User-Agent: KMail/1.4.3 References: <200308301649.h7UGnF5H042361@khavrinen.lcs.mit.edu> In-Reply-To: <200308301649.h7UGnF5H042361@khavrinen.lcs.mit.edu> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200309011217.13428.malcolm.kay@internode.on.net> cc: stable@freebsd.org Subject: Re: POSIX_C_SOURCE X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2003 02:47:21 -0000 On Sun, 31 Aug 2003 02:19, Garrett Wollman wrote: > In article <20030830161813.GA28890@twisted.net> you write: > >Any chance that someone will finally commit the fixes to prevent the > >POSIX_C_SOURCE warnings from showing up? I saw a number of posts on th= is > >topic, but it still seems like it's not "officially committed" > > > >/usr/include/sys/cdefs.h:273: warning: `_POSIX_C_SOURCE' is not define= d > >/usr/include/sys/cdefs.h:279: warning: `_POSIX_C_SOURCE' is not define= d > > The warnings are wrong,[1] so you should probably ask the GCC people > about that. > > -GAWollman > > [1] That is to say, any identifier used in a preprocessor expression > (after macro expansion) is defined to have a value of zero, and GCC > should not be complaining about this. > The warnings are only wrong in your personal interpretation of right and=20 wrong. Many gcc options generate warnings with legal C source and this is= =20 permitted by the C standard (whether or not it is controlled by a compile= r=20 option) provided it does not prevent generation of correct code. The warning is true: that is _POSIX_C_SOURCE is not defined (and is evalu= ated in an #if preprocessor statement). The warning only appears when -Wundef option is used which relates=20 specifically to this circumstance. GCC people surely cannot be criticised= =20 for an option that works precisely as documented. No-one individually has it wrong. The problem is one of incompatibility between the header files and the=20 compiler options selected. Since the compiler options are probably set fo= r a=20 range of environments it is probably best to adapt the system header file= s to=20 circumvent the difficulty. Malcolm Kay