diff options
author | Markus Armbruster <armbru@redhat.com> | 2022-12-22 13:08:13 +0100 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2023-01-08 01:54:22 -0500 |
commit | f07ceffdf50f7147250a98e4cb32fcd41bb9cc4a (patch) | |
tree | 8a3de17671ad2c99f03361ce4d1fd7d750f4a58f /docs | |
parent | 7a5951f651ad5f158631a826070b24631e733763 (diff) | |
download | qemu-f07ceffdf50f7147250a98e4cb32fcd41bb9cc4a.zip qemu-f07ceffdf50f7147250a98e4cb32fcd41bb9cc4a.tar.gz qemu-f07ceffdf50f7147250a98e4cb32fcd41bb9cc4a.tar.bz2 |
docs/devel: Rules on #include in headers
Rules for headers were proposed a long time ago, and generally liked:
Message-ID: <87h9g8j57d.fsf@blackfin.pond.sub.org>
https://lists.nongnu.org/archive/html/qemu-devel/2016-03/msg03345.html
Wortk them into docs/devel/style.rst.
Suggested-by: Bernhard Beschow <shentey@gmail.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20221222120813.727830-5-armbru@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Bernhard Beschow <shentey@gmail.com>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/devel/style.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/devel/style.rst b/docs/devel/style.rst index 7ddd42b..68aa776 100644 --- a/docs/devel/style.rst +++ b/docs/devel/style.rst @@ -293,6 +293,13 @@ that QEMU depends on. Do not include "qemu/osdep.h" from header files since the .c file will have already included it. +Headers should normally include everything they need beyond osdep.h. +If exceptions are needed for some reason, they must be documented in +the header. If all that's needed from a header is typedefs, consider +putting those into qemu/typedefs.h instead of including the header. + +Cyclic inclusion is forbidden. + C types ======= |