From owner-svn-src-all@FreeBSD.ORG Fri Jul 26 14:04:45 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 857B3FD2; Fri, 26 Jul 2013 14:04:45 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (unknown [IPv6:2001:610:1108:5012::107]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 45D1E2D12; Fri, 26 Jul 2013 14:04:45 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id A92CB1203C3; Fri, 26 Jul 2013 16:04:28 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 9140A28494; Fri, 26 Jul 2013 16:04:28 +0200 (CEST) Date: Fri, 26 Jul 2013 16:04:28 +0200 From: Jilles Tjoelker To: David Chisnall Subject: Re: svn commit: r253563 - head/contrib/libstdc++/include/c_std Message-ID: <20130726140428.GB14175@stack.nl> References: <201307231023.r6NANhGf065713@svn.freebsd.org> <20130725201948.2f5ae808@kalimero.tijl.coosemans.org> <7D9DA326-0F32-44D2-92F9-EED0751F9AE0@FreeBSD.org> <20130726122654.19448832@kalimero.tijl.coosemans.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Tijl Coosemans , src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jul 2013 14:04:45 -0000 On Fri, Jul 26, 2013 at 11:51:43AM +0100, David Chisnall wrote: > On 26 Jul 2013, at 11:26, Tijl Coosemans wrote: > > On Fri, 26 Jul 2013 10:43:07 +0100 David Chisnall wrote: > >> On 25 Jul 2013, at 19:19, Tijl Coosemans wrote: > >>> This also broke compilation of C code with -D_XOPEN_SOURCE=500. > >> Do you have a test case for this? > > % cc -c test.c -D_XOPEN_SOURCE=500 -Wall -std=gnu89 > > test.c:5:10: warning: implicit declaration of function 'isnan' > > [-Wimplicit-function-declaration] > > return( isnan( d )); > > ^ > > 1 warning generated. > > The isnan function is part of SUSv2: > > http://pubs.opengroup.org/onlinepubs/7990989775/xsh/isnan.html > > _XOPEN_SOURCE is handled in sys/cdefs.h. It sets the following macros: > > #define __XSI_VISIBLE 500 > > #define __POSIX_VISIBLE 199506 > > #define __ISO_C_VISIBLE 1990 > So, isnan and isinf should be visible in functions when in > __ISO_C_VISIBLE < 1999 and __XSI_VISIBLE < 600, and __XSI_VISIBLE >= > 500? This is cosmetic, but http://pubs.opengroup.org/onlinepubs/000095399/functions/isnan.html says that isnan() appeared in Issue 3. This is before _XOPEN_SOURCE == 500. A simple solution is to expose it when __XSI_VISIBLE > 0 && __XSI_VISIBLE < 600 && __ISO_C_VISIBLE < 1999. However, has no support for _XOPEN_SOURCE < 500 and there is no point in adding such support now. -- Jilles Tjoelker