From: Paolo Bonzini <pbonzini@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Peter Maydell <peter.maydell@linaro.org>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] directory hierarchy
Date: Mon, 17 Sep 2012 09:47:13 +0200 [thread overview]
Message-ID: <5056D581.5030205@redhat.com> (raw)
In-Reply-To: <87r4q2ni8n.fsf@codemonkey.ws>
Il 16/09/2012 16:40, Anthony Liguori ha scritto:
> It's good to put includes in a single direction such that you can do
> -Iinclude and then:
>
> #include "qemu/foo.h"
>
> Which is better than:
>
> #include "foo.h"
>
> Because the later can create confusion/conflict with system headers
> whereas the former is (hopefully) completely unambiguous.
My plan for this is to only put directories in include/, which limits a
lot the possibility of confusion, for example
#include <exec/cpu-all.h>
#include <qapi/qapi-types.h>
etc.
Unfortunately, this _does_ require touching every .c file.
>> > Moving to include/ would be to clean up the top-level directory, withour
>> > touching the source code. If something can be moved directly to one of
>> > the new source directories, that's also fine but I don't have high
>> > hopes.
> I actually thinking moving to -Iinclude is a Good Thing for now because
> it avoids touching a bunch of .c files. In the longer term, we should
> continue to clean up headers and move them into qemu/ though.
I disagree about qemu/ vs. other directories, but yes, it is better to
avoid touching .c files at the same time you're moving them.
It is not completely possible, mostly because some header files in net/
combine both private content (which should move to sysemu/net/) and
public content (which should move to include/net/), but that should be
the exception.
Paolo
next prev parent reply other threads:[~2012-09-17 7:47 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-14 13:17 [Qemu-devel] directory hierarchy Paolo Bonzini
2012-09-14 13:36 ` Peter Maydell
2012-09-14 13:53 ` Paolo Bonzini
2012-09-16 14:40 ` Anthony Liguori
2012-09-17 7:47 ` Paolo Bonzini [this message]
2012-09-14 13:44 ` Luiz Capitulino
2012-09-14 14:03 ` Paolo Bonzini
2012-09-14 13:47 ` Daniel P. Berrange
2012-09-14 13:57 ` Paolo Bonzini
2012-09-14 13:48 ` Peter Maydell
2012-09-14 13:55 ` Paolo Bonzini
2012-09-14 14:00 ` Peter Maydell
2012-09-14 14:37 ` Stefan Weil
2012-09-14 16:36 ` Paolo Bonzini
2012-09-14 16:09 ` Kevin Wolf
2012-09-14 16:45 ` Paolo Bonzini
2012-09-14 19:51 ` Blue Swirl
2012-09-14 21:28 ` Paolo Bonzini
2012-09-19 12:54 ` Avi Kivity
2012-09-19 19:57 ` Blue Swirl
2012-09-20 11:31 ` Avi Kivity
2012-09-22 13:15 ` Blue Swirl
2012-09-23 8:25 ` Avi Kivity
2012-09-23 16:07 ` Blue Swirl
2012-09-24 9:54 ` Avi Kivity
2012-09-16 14:44 ` Anthony Liguori
2012-09-17 7:52 ` Paolo Bonzini
2012-09-17 13:04 ` Anthony Liguori
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=5056D581.5030205@redhat.com \
--to=pbonzini@redhat.com \
--cc=anthony@codemonkey.ws \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).