From: Eric Blake <eblake@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>,
QEMU Developers <qemu-devel@nongnu.org>
Cc: Patch Tracking <patches@linaro.org>
Subject: Re: [Qemu-devel] [PATCH 03/14] disas/arm-a64.cc: Include osdep.h first
Date: Thu, 18 Feb 2016 10:15:14 -0700 [thread overview]
Message-ID: <56C5FC22.5040902@redhat.com> (raw)
In-Reply-To: <CAFEAcA91Aa7BeMToTXJ4_S=V+jWHzk+bx4N7NEKRJih0-MsMHA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1473 bytes --]
On 02/18/2016 08:49 AM, Peter Maydell wrote:
> On 9 February 2016 at 15:25, Peter Maydell <peter.maydell@linaro.org> wrote:
>> Rearrange include directives so that we include osdep.h first.
>> This has to be done manually because clean-includes doesn't
>> handle C++.
>>
>> -#include "vixl/a64/disasm-a64.h"
>> -
>> extern "C" {
>> +#include "qemu/osdep.h"
>> #include "disas/bfd.h"
>> }
>>
>> +#include "vixl/a64/disasm-a64.h"
>> +
>> using namespace vixl;
>>
>> static Decoder *vixl_decoder = NULL;
>
> So this patch doesn't build on the old mingw32 compiler. I think this
> is because this compiler is not C++11, and so its <stdint.h> doesn't
> provide various macros for C++ unless __STDC_CONSTANT_MACROS,
> __STDC_LIMIT_MACROS and __STDC_FORMAT_MACROS are defined before the
> first inclusion of <stdint.h>.
> (3) make osdep.h itself define the __STDC_* constants so it works
> with C++-before-C++11 as well as with C and with C++11
>
> I think I prefer (3) (though it does mean we will have to tweak
> osdep.h in future if a new vixl version should ever require any
> further similar #defines.)
(3) has my vote as well; it's the approach used by gnulib (wherever
practical, do whatever wrapping it takes to make all standard headers
appear like the most modern version of said header, even on older platforms)
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2016-02-18 17:15 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-09 15:24 [Qemu-devel] [PATCH 00/14] More #include cleanups Peter Maydell
2016-02-09 15:24 ` [Qemu-devel] [PATCH 01/14] cpu: Clean up includes Peter Maydell
2016-02-12 14:49 ` Andreas Färber
2016-02-09 15:24 ` [Qemu-devel] [PATCH 02/14] ui/cocoa.m: Include qemu/osdep.h Peter Maydell
2016-02-09 16:07 ` Eric Blake
2016-02-09 16:08 ` Peter Maydell
2016-02-09 15:25 ` [Qemu-devel] [PATCH 03/14] disas/arm-a64.cc: Include osdep.h first Peter Maydell
2016-02-18 15:49 ` Peter Maydell
2016-02-18 16:41 ` Markus Armbruster
2016-02-18 16:42 ` Peter Maydell
2016-02-18 17:15 ` Eric Blake [this message]
2016-02-09 15:25 ` [Qemu-devel] [PATCH 04/14] hw/block/nand.c: " Peter Maydell
2016-02-09 15:25 ` [Qemu-devel] [PATCH 05/14] target-cris: Remove unnecessary ifdef from mmu.c Peter Maydell
2016-02-09 15:25 ` [Qemu-devel] [PATCH 06/14] cris: Clean up includes Peter Maydell
2016-02-09 15:25 ` [Qemu-devel] [PATCH 07/14] libdecnumber: " Peter Maydell
2016-02-09 15:25 ` [Qemu-devel] [PATCH 08/14] tests/i440fx-test: Don't define ARRAY_SIZE locally Peter Maydell
2016-02-09 15:25 ` [Qemu-devel] [PATCH 09/14] tests: Clean up includes Peter Maydell
2016-02-09 15:25 ` [Qemu-devel] [PATCH 10/14] qapi: Clean up includes in generated files Peter Maydell
2016-02-09 15:25 ` [Qemu-devel] [PATCH 11/14] scripts/feature_to_c.sh: Include qemu/osdep.h rather than config.h Peter Maydell
2016-02-09 15:25 ` [Qemu-devel] [PATCH 12/14] scripts/tracetool: Include qemu/osdep.h in generated .c files Peter Maydell
2016-02-09 15:25 ` [Qemu-devel] [PATCH 13/14] all: Clean up includes Peter Maydell
2016-02-09 15:25 ` [Qemu-devel] [PATCH 14/14] oslib-posix.c: Move workaround for OSX daemon() deprecation to osdep.h Peter Maydell
2016-02-09 16:08 ` [Qemu-devel] [PATCH 00/14] More #include cleanups Eric Blake
2016-02-09 16:11 ` Eric Blake
2016-02-09 16:21 ` Peter Maydell
2016-02-09 17:01 ` Peter Maydell
2016-02-09 17:10 ` Eric Blake
2016-02-09 17:18 ` Eric Blake
2016-02-09 18:04 ` Peter Maydell
2016-02-09 18:17 ` Paolo Bonzini
2016-02-09 18:29 ` Eric Blake
2016-02-16 13:49 ` Peter Maydell
2016-02-16 15:47 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56C5FC22.5040902@redhat.com \
--to=eblake@redhat.com \
--cc=patches@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.