From owner-freebsd-current@FreeBSD.ORG Tue May 20 11:56:28 2014 Return-Path: Delivered-To: freebsd-current@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 ESMTPS id 3722A18E for ; Tue, 20 May 2014 11:56:28 +0000 (UTC) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cloud.theravensnest.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0448B2CFB for ; Tue, 20 May 2014 11:56:27 +0000 (UTC) Received: from dhcp-172-17-152-97.eduroam.lapwing.private.cam.ac.uk (global-1-26.nat.csx.cam.ac.uk [131.111.184.26]) (authenticated bits=0) by theravensnest.org (8.14.7/8.14.7) with ESMTP id s4KBuNvP040879 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Tue, 20 May 2014 11:56:26 GMT (envelope-from theraven@FreeBSD.org) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Subject: Re: updating standard headers to meet c++11 standard From: David Chisnall In-Reply-To: <537B2A57.5080801@ShaneWare.Biz> Date: Tue, 20 May 2014 12:56:18 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <26E76B72-1746-48A5-B6A2-335DEDF2026C@FreeBSD.org> References: <537B2A57.5080801@ShaneWare.Biz> To: Shane Ambler X-Mailer: Apple Mail (2.1874) Cc: FreeBSD Current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18 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: Tue, 20 May 2014 11:56:28 -0000 Hi, I thought I'd already fixed this a year or so ago. Looking at my = system, I see this in cdefs.h: /* C++11 exposes a load of C99 stuff */ #if defined(__cplusplus) && __cplusplus >=3D 201103L #define __LONG_LONG_SUPPORTED #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS #endif #ifndef __STDC_CONSTANT_MACROS #define __STDC_CONSTANT_MACROS #endif #endif So, if you're compiling C++ and the C++ standard is C++11 or later, we = define the __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS macros. If = it's C++98, you can define them yourself. Do you have a test case where this doesn't work? David On 20 May 2014, at 11:11, Shane Ambler wrote: > When including stdint.h in c++ we can #define __STDC_LIMIT_MACROS so > that we get macros like INT32_MAX defined. >=20 > Also related is __STDC_CONSTANT_MACROS >=20 > I have recently found that the need for these has been removed within > the c++11 standard. >=20 > This year old bug report was to update glibc to this end - > https://sourceware.org/bugzilla/show_bug.cgi?id=3D15366 >=20 > Also of note is that Apple removed the use of this macro from OSX with > the release of 10.9 over a year ago > = http://www.opensource.apple.com/source/xnu/xnu-2422.1.72/EXTERNAL_HEADERS/= stdint.h >=20 > I believe as we push to use llvm's libc++ and support for c++11 we > should also make sure the rest of our sources are kept up to date as > well. >=20 > Are there any other changes within c++11 or c++14 that we should be > looking to update? >=20 > Shane > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to = "freebsd-current-unsubscribe@freebsd.org"