On Tue, 25 Jun 2024 at 10:27, Peter Maydell <peter.mayd...@linaro.org> wrote:
>
> On Tue, 25 Jun 2024 at 07:19, Philippe Mathieu-Daudé <phi...@linaro.org> 
> wrote:
> >
> > On 25/6/24 08:05, Paolo Bonzini wrote:
> > >
> > >
> > > Il mar 25 giu 2024, 04:32 Roman Kiryanov <r...@google.com
> > > <mailto:r...@google.com>> ha scritto:
> > >
> > >     Hi Philippe, thank you for looking.
> > >
> > >     On Mon, Jun 24, 2024 at 7:27 PM Philippe Mathieu-Daudé
> > >     <phi...@linaro.org <mailto:phi...@linaro.org>> wrote:
> > >      > In particular this patch seems contained well enough
> > >      > to be carried in forks were C++ _is_ used.
> > >
> > >     Will you agree to take #ifdef __cplusplus  and #error to the QEMU side
> > >     in atomic.h and
> > >     we will keep atomic.hpp on our side? The error message looks better
> > >     when atomic.hpp
> > >     is somewhere near.
> > >
> > >
> > > I think we should also move typeof_strip_qual elsewhere; I will take a
> > > look. I think there are a couple headers that already have #ifdef
> > > __cplusplus, but I need to check (no source code around right now).
> >
> > $ git grep -l __cplusplus
> > ebpf/rss.bpf.skeleton.h
> > include/hw/xtensa/xtensa-isa.h
> > include/qemu/compiler.h
> > include/qemu/osdep.h
> > include/standard-headers/drm/drm_fourcc.h
> > include/sysemu/os-posix.h
> > include/sysemu/os-win32.h
> > linux-headers/linux/stddef.h
> > qga/vss-win32/requester.h
>
> We should delete all of those, they're dead code for us now.
> We dropped some of the extern-C-block handling in
> commit d76aa73fad1f6 but that didn't get all of them.

I was wrong about this -- I had forgotten about the Windows
Guest Agent code that has to be built with the Windows C++
compiler -- some of the cpp files in qga/vss-win32/ include
osdep.h. So the files above break down into:

 * files imported from third-party projects, or generated
   by third-party tools:
    + ebpf/rss.bpf.skeleton.h
    + include/hw/xtensa/xtensa-isa.h
    + include/standard-headers/drm/drm_fourcc.h
    + linux-headers/linux/stddef.h

 * QEMU include files that we need to include directly
   or indirectly from the vss-win32 files:
    + include/qemu/compiler.h
    + include/qemu/osdep.h
    + include/sysemu/os-win32.h
    + include/sysemu/os-posix.h
    + qga/vss-win32/requester.h

Maybe we could drop the cplusplus handling from os-posix.h,
but I guess we're keeping it in parallel with os-win32.h.

-- PMM

Reply via email to