On 02/18/2016 08:49 AM, Peter Maydell wrote: > On 9 February 2016 at 15:25, Peter Maydell 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 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 . > (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