From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45691) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWTfW-0008Ld-FO for qemu-devel@nongnu.org; Thu, 18 Feb 2016 13:51:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWTfT-0003Yn-94 for qemu-devel@nongnu.org; Thu, 18 Feb 2016 13:51:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47465) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWTfT-0003YV-3h for qemu-devel@nongnu.org; Thu, 18 Feb 2016 13:51:11 -0500 References: <1455818725-7647-1-git-send-email-peter.maydell@linaro.org> <1455818725-7647-3-git-send-email-peter.maydell@linaro.org> From: Eric Blake Message-ID: <56C61299.60805@redhat.com> Date: Thu, 18 Feb 2016 11:51:05 -0700 MIME-Version: 1.0 In-Reply-To: <1455818725-7647-3-git-send-email-peter.maydell@linaro.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hD7dEFJQTb1JNwJG69FhNC0FCBj75KxCs" Subject: Re: [Qemu-devel] [PATCH 2/8] osdep.h: Define macros for the benefit of C++ before C++11 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , qemu-devel@nongnu.org Cc: patches@linaro.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --hD7dEFJQTb1JNwJG69FhNC0FCBj75KxCs Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 02/18/2016 11:05 AM, Peter Maydell wrote: > For C++ before C++11, requires definition of the macros > __STDC_CONSTANT_MACROS, __STDC_LIMIT_MACROS and __STDC_FORMAT_MACROS > in order to enable definition of various macros by the header file. > Define these in osdep.h, so that we get the right header file > definitions whether osdep.h is being used by plain C, C++11 or > older C++. >=20 > In particular libvixl's header files depend on this and won't > compile if osdep.h is included before them otherwise. >=20 > Signed-off-by: Peter Maydell > --- > include/qemu/osdep.h | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) Reviewed-by: Eric Blake > +/* Older versions of C++ don't get definitions of various macros from > + * stdlib.h unless we define these macros before first inclusion of > + * that system header. > + */ > +#ifndef __STDC_CONSTANT_MACROS > +#define __STDC_CONSTANT_MACROS > +#endif Style nit: In libvirt, we've grown used to writing: #ifndef ... # define ... #endif that is, use spacing to make it more visually obvious what level of conditional nesting is in effect during preprocessor lines. But short of a tree-wide change to enforce that style (which I'm not advocating), it's more of a food for thought comment, and has no bearing on taking this series as is. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --hD7dEFJQTb1JNwJG69FhNC0FCBj75KxCs Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWxhKZAAoJEKeha0olJ0NqDiUH/0N/9DtNYPSETokaPrlKXZpP VKLzPfu46cknNzRi931hhtZRRG0VWdIEaNkNNmk551sbpj1fb5VBiF/8HpoD04CS Y0KWsZh7OkWk0iWkNl4Z+a98OS2oEPKPwBw1sqhjfj/S7+L5ENVzLFdziCKq3pLD u5+iyuVnr0JYIHoeLDNqWeE+nMPqPeuNsLF2RyRGPzBuypqKeEXAynKpOnr9iZiz WobhuFxnRjTw5vl+UcfwB/AUdvSCvjx4J9QUFaz1Dta7RVmW36Y+2++VKXK2Qm9H q3K9xgR+ROCBTPXdxYcWqC7/VopgyVP3OsdRhz/ztQNiLdvbD4a211t7BQAqadI= =Wl7s -----END PGP SIGNATURE----- --hD7dEFJQTb1JNwJG69FhNC0FCBj75KxCs--